Exactly, that's why I don't understand what's happen in my application. Indeed, when I shutdown my webapp, the LoggerContext is stop first but restart just after (and not stop again). The normal behavior should be that the LoggerContext it stop and that's all (not start again during the shutdown). Or maybe I missing something ...
2015-10-20 19:48 GMT+02:00 Jochen Wiedmann <[email protected]>: > This is quite as it should. If the webapp is being shutdown, then all > acquired resources (including the logging system) are to be released. > You'd end up with a resource leak otherwise. Why do you expect log4j > to be an exception? > > Jochen > > > On Tue, Oct 20, 2015 at 6:41 PM, Benoit Mouquet <[email protected]> > wrote: > > Hello everyone, > > > > I send you a mail because I'm currently try to integrate log4j2 in new > > project (Java web application, spring, hibernate ...). > > > > I have configured my dependency (I use SLF4J with Log4j2 and the module > > Log4j2-web) and create my log4j2.xml file and all seems to work properly. > > The only problem is that my LoggerContext is reloaded when I close my > Jetty > > server (shutdown first and start again). You can see it in the log.txt > file. > > I don't understand why this occurs. Is it a normal behavior ? How I can > > avoid this ? > > > > > > Thanks in advance, > > > > -- > > Benoit Mouquet > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > -- > The next time you hear: "Don't reinvent the wheel!" > > > http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Benoit Mouquet Tel : 06 40 19 13 62
