[slf4j-user] nullary LoggerFactory.getLogger method?

Zack Sampson Zack.Sampson at twosigma.com
Mon May 9 18:54:53 UTC 2016


Hey,

We've recently migrated from our own façade around log4j to SLF4J. One of the niceties we leave behind is a nullary getLogger call, kind of like so:

Logger _log = Logger.getLogger();

We use reflection to look at the stack and get the calling class's name. We find this more convenient and consistent than manually specifying the name of the class.

Is there any reason SLF4J doesn't support something like this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20160509/2e1764bc/attachment.html>


More information about the slf4j-user mailing list