i have few servlets that use log4j, i am initializing logger in init() of servlet
i want to write the destroy() method for this servlet
i want to know what to do with to close or destory this objLogger in destroy()
posted 11 years ago
I don't believe that you need to destroy the Logger reference (objLogger). I have never worried about it in the past and never had any trouble. I guess however if you really wanted you could simply do an objLogger = null; Looking at the API there appears to be no means to remove/destroy one particular Logger, not in 1.2.11 anyway. You can remove all Loggers including the RootLogger but I am not sure what this will really do (see LogManager.shutdown() if you want to try it)
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads