One would imagine that logging has been largely solved at this point. Simple tasks, like, "Only print this message when we're in debug mode," seem like obvious, well-understood features for any logging library.
"LostLozz offers us a… different approach to this problem.
if ( LOG.isDebugEnabled() ) {
try {
Integer i = null;
i.doubleValue();
}
catch ( NullPointerException e ) {
LOG.debug(context.getIdentity().getToken() + " stopTime:"
+ instrPoint.getDescription() + " , "
+ instrPoint.getDepth(), e);
}
}
If we're in debug mode, trigger a null pointer exception, and catch it. Then we can log our message, including the exception- presumably because we want the stack trace. Because - Provision your servers automatically without ever needing to log-in to a command prompt. Get started today!
SOCIAL SHARE CARD GENERATOR