https://issues.apache.org/bugzilla/show_bug.cgi?id=55215
--- Comment #1 from Konstantin Kolinko <knst.koli...@gmail.com> --- (In reply to Brian Burch from comment #0) > Created attachment 30569 [details] > 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. > So it boils down to removing the trailing dot from log4j.appender.CATALINA.File=${catalina.base}/logs/catalina. to be log4j.appender.CATALINA.File=${catalina.base}/logs/catalina and so on, because the dot is already contained in DatePattern property. > 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". I think this should be kept as is. 1). The .log suffix might be needed e.g. to assign mime types when serving those files through HTTP. It may be also useful when transferring such files between systems. Some clients automatically do LF<->CRLF according to file types. 2). This configuration is supposed to match the default (JULI) one. > 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. Interesting, but I suspect that it will be harder for newbies to read such configuration. > 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