How do you use Log4j to write/capture stdout and stderr to a file and using Windows and Tomcat 5.5 (Java)?
问题 I am using Windows 2008 R2 and Apache Tomcat 5.5, for your information. STDOUT and STDERR can be automatically logged through Apache Tomcat properties, via Logging tab -> Redirect Stdout and Redirect Stderror textboxes. But I want to control this through log4j. I'm trying to leverage ConsoleAppender and the TimeAndSizeRollingAppender class to rollover what would normally be controlled by Apache Tomcat's innate logging. Basically, however Tomcat redirects stdout and stderr to a file, I want to