[slf4j-dev] [Bug 97] New: Please add isLogLevelEnabled(LogLevel) and log(LogLevel, ...) methods to the SLF4J API

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Thu Aug 14 16:06:38 CEST 2008


http://bugzilla.slf4j.org/show_bug.cgi?id=97

           Summary: Please add isLogLevelEnabled(LogLevel) and
                    log(LogLevel,...) methods to the SLF4J API
           Product: SLF4J
           Version: 1.5.x
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Core API
        AssignedTo: dev at slf4j.org
        ReportedBy: zoli.szel at morganstanley.com


Hi,

I would like to propose to add the mentioned methods into the SLF4J API because
of the following:

When you are doing library or framework developement there can be cases, when
the log level is dynamically determinated(Configuring it via config file). 

For example.:
  Log level of a specific problem.

  We are developing an application framework, where we want to let the end user
to decide on which level a flow tracer should log.

This can be worked around fairly easy with implementing a switch statement
using an Enum or The integer values from the LocationAwareLogger interface, but
this is cumbersome and i think such a feature should be provided out of the
box.

Looking at the Logger implementation in Logback, which has the
isEnabledFor(LogLevel) method, i am wondering why this feature has been left
out from SLF4J. 

Thanx for your attention in advance.

Regards,
Zoltan Szel


-- 
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