[slf4j-dev] [Bug 186] [patch] Enhanced SimpleLogger implementation

bugzilla-daemon at qos.ch bugzilla-daemon at qos.ch
Fri Jun 8 17:20:38 CEST 2012


--- Comment #7 from Cédrik LIME <cedrik.lime at gmail.com> 2012-06-08 17:20:38 CEST ---

You are right, a full-fledge logging framework is the ultimate goal.

That said, there are times (e.g. prototyping code that you may re-use or
promote, hence the use of a logging API) when you simply want the logging
output fast on the console without spending time and brain to configure a
"heavy-weight" logging framework. This is exactly what motivated the creation
of SimpleLogger in the first instance.

But as it stands, SimpleLogger is a bit "rigid". A little bit of flexibility
would be welcomed in order to rapidly, e.g. print debug statements from part of
the code while debuging. This is what this patch does.

This patch is small and simple. I do not want to morph SimpleLogger into a huge
logging framework! There are no appenders, no message-event object, no filters,
no nothing really. Only the possibility to easily (and fast!) configure at
which level it should log.
This is the little bit of flexibility that SimpleLogger lacks right now, and
that patch makes it go from "nearly unusable in real world" to "perfect for its
limited purpose".

As an added bonus (the cherry on the cake), I made it so that people using
commons-logging SimpleLog feel at home when switching to SLF4J SimpleLogger.

This new implementation is 100% compatible with the previous one. If you don't
want to fiddle with it, fine! you get the same exact behaviour as previously.
The "extra power" is immediately there should you need/want it.


Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the slf4j-dev mailing list