Skip to content

slf4j-jdk-platform-logging always logging Level.ALL messages regardless of logger level #430

@peterhalicky

Description

@peterhalicky

So, sun.security.ssl.SSLLogger logs its finest events with Level.ALL. While that on its own is a bug (and I reported it), I'd say slf4j-jdk-platform-logging is still handling it incorrectly. It gets written out as TRACE level, regardless of level setting of the logger.

I'm all for treating the Level.ALL as TRACE, but it should also be filtered as such. I suppose in SLF4JPlatformLogger.log(...) method instead of current:

        if (jplLevel == Level.ALL) {
            performLog(org.slf4j.event.Level.TRACE, bundle, msg, thrown, params);
            return;
        }

it should be:

        if (jplLevel == Level.ALL) {
            if (slf4jLogger.isEnabledForLevel(org.slf4j.event.Level.TRACE)) {
                performLog(org.slf4j.event.Level.TRACE, bundle, msg, thrown, params);
            }
            return;
        }

I will gladly submit a PR if this looks okay to the relevant people here.

Metadata

Metadata

Assignees

Labels

DONEfor fixed issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions