No, I think the old LoggerConfig objects can be GC-ed after a reconfiguration.
Sent from my iPhone > On 2015/04/20, at 8:07, Gary Gregory <[email protected]> wrote: > > Are loggers GC'd on a reconfigure? > Gary > > -------- Original message -------- > From: Remko Popma <[email protected]> > Date: 04/19/2015 15:33 (GMT-08:00) > To: Log4J Users List <[email protected]> > Subject: Re: Memory leak by not disposing loggers > > Loggers are not GC-ed until the whole logging subsystem is GC-ed. That is > until your webapp is unloaded or standalone process is stopped. > Is your app a webapp? > > Sent from my iPhone > >> On 2015/04/20, at 1:27, Gary Gregory <[email protected]> wrote: >> >> The LoggerContext.loggers is a ConcurrentHashMap<String, Loggers>. It >> sounds like you need the effect of a ConcurrentHashMap with weak values... >> >> Gary >> >> On Sun, Apr 19, 2015 at 2:27 AM, Veselin M <[email protected]> >> wrote: >> >>> Hello all, >>> >>> I have a memory leak problem with Log4j2. I’m using SLF4J to get loggers >>> for my objects. Unfortunately when they get garbage collected the logger >>> remains cached in LoggerContext.loggers in the log4j framework. Is there >>> any way to prevent the caching or to remove the logger? >>> >>> Regards >>> Veselin >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >> >> >> -- >> E-Mail: [email protected] | [email protected] >> Java Persistence with Hibernate, Second Edition >> <http://www.manning.com/bauer3/> >> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> >> Spring Batch in Action <http://www.manning.com/templier/> >> Blog: http://garygregory.wordpress.com >> Home: http://garygregory.com/ >> Tweet! http://twitter.com/GaryGregory > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
