This content has been marked as final.
Show 2 replies
-
1. Re: JUL Logger.getLogger(name) returning different objects?
jameslivingston Feb 1, 2016 6:08 PM (in response to rnikander)I don't believe that the j.u.l API guarantees that, "Logger objects may be obtained by calls on one of the getLogger factory methods. These will either create a new Logger or return a suitable existing Logger."
In the case of JBoss LogManager, it returns a new Logger object on each call, however that is only a thin facade over a LoggerNode which is shared between all the Loggers for the same name.
-
2. Re: JUL Logger.getLogger(name) returning different objects?
rnikander Feb 2, 2016 1:15 PM (in response to jameslivingston)Thanks, that clarifies it. I configuring my logging with jboss-cli.sh and everything is working.
I'm not going to dig into this now, but I do wonder about j.u.l.Logger.getLogger. The javadoc on the method says this:
"If a logger has already been created with the given name it is returned. Otherwise a new logger is created."