[slf4j-user] Logging with log level as parameter

Christian Schneider chris at die-schneider.net
Tue Sep 6 12:43:59 CEST 2011


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



More information about the slf4j-user mailing list