You can print the stack trace in the logger.error().  That way it will go to the configured log file and not just standard error.