资 源 简 介
jcl5jis thin wrapper of Jakarta Commons-Logging for Java5 or above.
This project is inspired by log5j.
Usage
First. It is no long required to give Commons-Logging the category when creating a new class level log. jcl5j just figures it out from the call stack.
For example old usage for Commons-Logging was:
private static final Log log = LogFactory.getLog( Foo.class );
and the new syntax with jcl5j :
private static final Log log = LogFactory.getLog();
Much better and fixes a lot of copy/paste errors.
Second. It provides sprintf support for logging messages
Before:
log.debug( "This thing broke: " + foo + " due to bar: " + bar + " on this thing: " + car );
After:
log.debug( "This thing broke: %s due to bar: %s on this thing: %s", foo, bar, car );
That is so much better. Good god!
Performance