The default configuration for JULI that ships with Tomcat is somewhat complex: it defines a number of handlers and maps application and server logging to each. The sample configuration for log4j in the logging documentation is quite simple and just shoves everything into a single log file. It would be nicer to include a sample configuration for log4j that mirrors the default one.
Patches welcome
Created attachment 26274 [details] Sample log4j configuration that matches default java.util.logging configuration Patches provided
Patch applied. Many thanks. It will be in 7.0.5 onwards. I made one minor tweak, I left the default log level as INFO so it was consistent with the instructions further down for using DEBUG level logging.
Here's my attempt to integrate Tomcat with SLF4J + Logback from the very beginning (Catalina.main()): https://github.com/grgrzybek/tomcat-slf4j-logback It works for me and contains logback configuration matching the original J.U.L and Log4j herein. regards Grzegorz Grzybek
Please don't hijack similar but unrelated bugs. Anything added to an already resolved bug is almost certain to get ignored / lost. Please create a new Enhancement request for the logback support. It appears that this is a standalone project. Providing a patch in diff -u format against Tomcat trunk (model it on the log4j support in extras) would increase the chances of this being included in the standard Tomcat distribution.