public static void log ( final Level level , final Throwable exception ) { String nameOfException = exception . getClass ( ) . getName ( ) ; String messageOfException = exception . getMessage ( ) ; if ( messageOfException == null || messageOfException . isEmpty ( ) ) { System . err . println ( "LOGGER " + level + ": " + nameOfException ) ; } else { System . err . println ( "LOGGER " + level + ": " + messageOfException + " (" + nameOfException + ")" ) ; } }
Logs a caught exception .