For some reason instead of just printing out the error message with logging it prints the stack trace to the console followed by the message:
logging
stack trace