I was not speaking of LoggerConfig.getLoggers().
There are two methods that I referenced:
Configuration.getLoggers() returns a Map of <String, LoggerConfig>
LoggerContext.getLoggers() returns a Collection of Logger.
---------------
Maybe You meant LoggerContext.getLoggers(). However, when I do it after
I have obtained LogManager.getLogger(), it is still empty.
Hahaha. Okay. FALSE did the trick :D.
> Also, you probably want to specify LogManager.getContext(false).
YUP. (Shame).
--------------
Now LoggerConfig.getLoggers() shows:
[thunderbolt.Server:TRACE in 1625635731]
after I've already use that logger.
This seems to mean there are two contexts: one with "Default" as name
and a later one with 1625635731 as name.
(as it shows in the debugging output).
Op 10-8-2015 om 20:39 schreef Ralph Goers:
LoggerConfig.getLoggers() returns a list of all the Loggers created by calls to
LogManager.getLogger(), not a list of LoggerConfigs.
I don’t see a root logger being created in your code. I believe that means a
default root logger will be used that logs at ERROR. From the code below it
isn’t clear to me what the names are of the LoggerConfig objects you are
creating. If none of them “match” the name of the current class then the
behavior you are seeing would be expected.
I was aware of that, but I double triple quadro checked ;-). However the
list of loggers was also empty even after I'd used the logger. With the
different context (false) it works.
Thanks man.
I really don't know how that works with these contexts yet. Maybe I'll
find out.
Kudos,
Bart.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]