use logger to print stack trace