# Tomcat 8.0.9 logging



## Stephan.Woebbeking (15. Jul 2014)

Hi,

I ran into an incident that I feel is really, really strange:

I start my TomCat 8.0.9, probably with a slightly wrong configuration with regard to logging. The result is this text in the tomcat8-stderr.<date>.log file (only part of it):


```
#15-Jul-2014 12:27:29.370 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
15-Jul-2014 12:27:29.385 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
15-Jul-2014 12:27:29.387 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13724 ms
15-Jul-2014 12:28:36.662 WARNING [http-nio-8080-exec-2] null.null JSF1063: WARNUNG! Der nicht serialisierbare Attributswert wird in HttpSession festgelegt (Schlüssel: customer, Wertklasse: at.irian.jsfatwork.gui.page.Customer).
log4j:WARN No appenders could be found for logger (at.irian.jsfatwork.gui.page.Customer).
log4j:WARN Please initialize the log4j system properly.
```

After I changed the configuration and start the TomCat again I look at EXACTLY THE SAME file again and it reads like this:


```
15-Jul-2014 12:27:29.370 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
15-Jul-2014 12:27:29.385 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
15-Jul-2014 12:27:29.387 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13724 ms
15-Jul-2014 12:28:36.662 WARNING [http-nio-8080-exec-2] null.null JSF1063: WARNUNG! Der nicht serialisierbare Attributswert wird in HttpSession festgelegt (Schlüssel: customer, Wertklasse: at.irian.jsfatwork.gui.page.Customer).
15-Jul-2014 12:28:57.626 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
15-Jul-2014 12:28:57.683 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
15-Jul-2014 12:28:57.735 INFO [Thread-6] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
15-Jul-2014 12:28:57.817 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads The web application [/Gourmet01] appears to have started a thread named [Mojarra-WebResourceMonitor-1-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: <removed>
15-Jul-2014 12:28:57.826 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads The web application [/Gourmet01_tryLog4j] appears to have started a thread named [Mojarra-WebResourceMonitor-2-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:<removed>
15-Jul-2014 12:28:57.847 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
15-Jul-2014 12:28:57.850 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
```

From that I can only find that the log file has changed AFTER some information was added. So TomCat (or whoever was it) has DELETED some information from the logfile upon shutdown.

Did that ever occur to anyone? Do you think it is possible or should I see a doctor to analyse my brain? 

Regards,
Stephan


----------

