It doesn't exist in SLF4J. I've implemented something probably near identical to yours:
https://github.com/Mahoney/sysout-over-slf4j/blob/master/sysout-over-slf4j-context/src/main/java/uk/org/lidalia/sysoutslf4j/context/LogLevel.java ----- Original Message ----- > From: "Christian Schneider" <[email protected]> > To: [email protected] > Sent: Tuesday, 6 September, 2011 11:43:59 AM > Subject: [slf4j-user] Logging with log level as parameter > Hi all, > > I would like to use slf4j with a user defined log level. > > Currently I use the interface Logger which only has methods like > info(String). > Is there a way to call slf4j with something like > logger.log(Loglevel.INFO, "Message"); > Additionally I need a method that tells me if messages with a certain > level would be logged like: > log.wouldBeLogged(Loglevel.INFO); > > This is needed in the log component of Apache Camel. Currently we have > written a wrapper for this ourself but it is quite ugly. So it would > be > great if slf4j would offer such functionality. > > Christian > > -- > -- > Christian Schneider > http://www.liquid-reality.de > > Open Source Architect > Talend Application Integration Division http://www.talend.com > > _______________________________________________ > slf4j-user mailing list > [email protected] > http://qos.ch/mailman/listinfo/slf4j-user _______________________________________________ slf4j-user mailing list [email protected] http://qos.ch/mailman/listinfo/slf4j-user
