Hi,

I am trying to apply a certain property (String) to a Logger in order to
later (optionally) define a Filter and Layout based on that property, but I
haven't found a (nice) way to do that with the standard API (SLF4J with
LOGBack). I was thinking about providing an extension of the Logger, but
that class is final so I am wondering how I can solve my problem without
touching LOGBack code. Maybe I am better off in the user list, but after I
wasn't sure what's the better place for that. Unfortunately, I can't use
Markers, because the property is not thread based (but ClassLoader - bundle
based). The only simple solution that crossed my mind was using a custom
syntax for my logger name, like "my.custom.property:some.FQCN". My problem
with this version is that I would change the naming convention of loggers,
which I would like to avoid if possible.

Thanks,
Mirko
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev

Reply via email to