[logback-user] Logback ClassOfCallerConverter failure for org.slf4j.ext.LoggerWrapper descendants

USHAKOV, Sergey s-n-ushakov at yandex.ru
Sat Mar 7 13:05:51 CET 2015


I have currently come across an issue that if a 
org.slf4j.ext.LoggerWrapper subclass is used as logger in combination 
with Logback, then any logging methods inherited from it are prevented 
from location information being logged: class, method and line number 
are all replaced with question marks. Only methods overridden by a 
subclass are logged correctly.

The reason seems to be that 
method only recognizes "org.slf4j.Logger" and 
"org.apache.log4j.Category" as appropriate stack trace delimiters, and 
"org.slf4j.ext.LoggerWrapper" fails to be recognized.

My guess is that "org.slf4j.ext.LoggerWrapper" should be allowed to 
serve as stack trace delimiter somehow, be it explicitly by class name 
or implicitly by package name, or any other way...

Does it look like a minor bug in Logback with respect to LoggerWrapper?

Or if I am mistaken, please advise of any other appropriate way to get 
location information from org.slf4j.ext.LoggerWrapper ...

Thanks and best regards,

More information about the Logback-user mailing list