This content has been marked as final. Show 4 replies
At some point in time, the internals of the LogManager/Logger classes were changed so that they maintain WeakReferences to child Loggers. my guess is that your code is not keeping a hard reference to the Logger which you have configured and it is getting garbage collected at some later point in time (and therefore not getting any future messages).
Did some more debugging. The application is an application running under the Glassfish 2.1.1 application server. The logger is configured in a Lifecycle module and accessed in an EJB module. Here is what I found.
With JDK 1.6.0_05, the logger that I get in the Lifecycle module is the same logger instance that I get within the EJB where I am logging. In the EJB, I get all of the handlers and print out the information and all is correct and the logging works with the handler.
Change the symbolic link to point to JDK 1.6.0_22 and the logger that I get in the Lifecycle module is not the same logger instance that I get within the EJB where I am logging. This time in the EJB, the logger's level is "null" and there is no handler associated with the logger. So that is why it is not logging. What I don't understand is why the logger instance is retrieved in the EJB is not the same logger instance in the Lifecycle module.
Any ideas will be greatly appreciated.