[logback-user] PatternLayout feature request

Arthur Blake blakesys at yahoo.com
Wed Jul 11 20:13:47 CEST 2007


I'm using Logback on a new project.  I like it a lot so far.  Seems like a leaner, tighter log4j.  Pretty easy to learn quickly because it is so similar to log4j in a lot of ways.

I'd like to see a feature in the PatternLayout where I can show just the class name of the logger without its package prefix.
For example, if I have a logger named com.mycompany.myapplication.myarea.Stuff 
I'd like a version of the %logger conversion word that just outputs "Stuff"
(not "com.mycompany.myapplication.myarea.Stuff" or even "c.m.m.m.Stuff")

Most of my classes are unique across package names, and I'd like my log output to be more concise in this way.
I'm not worried about being confused by name collisions because my application is small enough that it's obvious what logger is involved in my log output.

I've gotten around this so far by naming some of my logs with just the class name without it's package, but I'd rather have a PatternLayout conversion word or specifier to handle this.

Forgive me if this feature is already in the PatternLayout, but I couldn't find it after looking pretty hard.

Thanks
Arthur






 
____________________________________________________________________________________
We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://qos.ch/pipermail/logback-user/attachments/20070711/9dd7a373/attachment.htm 


More information about the Logback-user mailing list