https://issues.apache.org/bugzilla/show_bug.cgi?id=55215
Bug ID: 55215 Summary: Improvements to sample log4j configuration Product: Tomcat 8 Version: trunk Hardware: PC OS: Linux Status: NEW Severity: minor Priority: P2 Component: Documentation Assignee: dev@tomcat.apache.org Reporter: br...@pingtoo.com Created attachment 30569 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30569&action=edit patch to docs/logging.xml I decided to make a fresh start with my log4j configuration because it hasn't changed much since tc5. Naturally, I chose http://tomcat.apache.org/tomcat-7.0-doc/logging.html as my starting point. The sample configuration seems to suffer from the same kind of problem - log4j was quite picky about syntax in "the old days" and so the current version seemd to be worth a spring clean. 1. The File properties cause the "live" log files to be created with names that have a trailing dot. Further, as these files are renamed by the Rolling Appender they end up with a double dot in the middle of the new file name. 2. The "live" files also acquire an additional ".log" suffix when Rolled. This is superfluous when the configuration quite sensibly puts all the files into a subdirectory called "logs". 3. Following log4j best practices (http://juliusdavies.ca/logging.html), I have extracted three error-prone substrings which are used many times, and defined them at the top of the configuration as local log4j symbolic variables. 4. I have consistently used white space around the property equals signs to improve readability. Some of the older properties did not use white space, while the newer ones did. The patch is directed at tc8 trunk, although the generated html sample configuration is a subset of that currently working on my production tc7 system. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org