2009/6/9 Christopher Piggott <cpigg...@gmail.com>: > (...) > This was not working, so I searched documentation and learned about: > > <Context swallowOutput="true"> ... </Context> > > However, this swallowOutput doesn't seem to work. I tried putting > this in several places: > (...) >
If you are still puzzled with swallowOutput mistery, here is my experience. I tried a similar thing once, not with log4j, but with JULI in TC 5.5, and also found that swallowOutput does not work with logging frameworks. The reason, as I see it, is the following: 1. to implement this functionality, Tomcat creates a custom PrintStream (SystemLogHandler) and replaces the default System.out and System.err 2. logging classes start up and are initialized before the above said happens, and at their initialization time they get reference to the original System.out and System.err PrintStreams, bypassing this replacement trick. After some thought my conclusion was that there is too much of a trick involved in that swallowOutput thing and I would better seek for a solution inside the logging framework itself. Though I do not have a clear recipe yet. I was not very interested. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org