Hello Christopher, > What steps did you actually take? Steps on this site: http://mrhaki.blogspot.com/2011/02/configure-log4j-on-tomcat.html
Downloaded new jars from "extras" for tomcat. tomcat-juli.jar and tomcat-juli-adapters.jar. Placed the tomcat-juli.jar file in our $CATALINA_BASE/bin directory. The file tomcat-juli-adapters.jar is copied to our $CATALINA_BASE/lib directory. Downloaded the latest log4j 1.2 library from the download page and copied to the $CATALIN_BASE/lib directory. Added the Log4j configuration file as it is on the link above. Disable the old Tomcat JUL logging configuration by deleting logging.properties Placed the Log4j configuration file. In the $CATALINA_BASE/lib directory I am not a java person but I believe we are using logback is what our java developers say, we do not state what files to log to but what to log and I think Tomcat logged it to the log file. <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener"/> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> <layout class="com.donlen.common.utility.logging.DefaultAlignedLayout"/> </encoder> </appender> Thanks! -----Original Message----- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, April 15, 2014 2:22 PM To: Tomcat Users List Subject: Re: Tomcat logging with Log4j -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Scott, On 4/15/14, 2:50 PM, Scott Bailey wrote: > We need to add log rotation and log size management to tomcat 7. > Tried converting to Log4j steps from tomcat website > (http://tomcat.apache.org/tomcat-7.0-doc/logging.html) but did not > work, was able to get it to work from > (http://mrhaki.blogspot.com/2011/02/configure-log4j-on-tomcat.html). > > It seems we are not getting any logging from our webapp though, and > prior to this change it was getting logged in stdout and stderr. What steps did you actually take? > Does something need to be changed in log4j.properties to still capture > stdout and stderr to log file with Log4j? How are you logging from within your application? ServletContext.log()? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTTYbNAAoJEBzwKT+lPKRYHB4P/RUlDHyT2wQTt41S0YB/VbCR leQxOtDJYeO3WZ3qERNP1yzmX3GW2xKfxy8+5yXAgmPugO4LXbW2sj7a4VEDuR3D l5a/AkjqvsEdJFvWAB/77NFzWvcbOfiBT5Iw8AdkoprzaitdsD7UelLA7OlLbSCr EnLp1ZQmVJHEdAaFc0Rr2tH7SY1oSFZM19wmihBPTFZsOfnssiEnDnO6zhxgl9kG IlvNNuadefd0TxUiaNsncNYQatGjNsWHsjf6miYcEuJ2ZEz8x0YBzZv60MP0qiVi U/YvkvQCwGJU9wYvK9SjKpmJrunnB2dt3zKL724+qCw4D8h7qcccq6yytBXGRDha x4847oIbkvG7fqtljQTjfefuh8fFKalEVR8LP3huQtHqkpT4YRnRhJifFwZQmz1E aj7h/dz91F5pWmN673Fs8aO5LAM8qvsk7sT89QtBle0REeFZFEGPqGwBsDDV4sgE Shnr4JuR+xVyGCInHzV/zMDJ4EtVZVHRNFUnG9zS9Q5+FWfiOVc4cqxb4s6NgRKg mVhC8qharbzt/3I0nLNtMIxbz8c7hB2zNGBgjaQHEZ8BNp0+p3MtEOz9fGywi0pR CEL+HtjWbfaV+O8d3HSLyQMqtT5/ZOm10ZBG0s1yFjhaoxwz3yUjLLu2G3TeGJeD rRzHvGKrkAwWRehs+Zgm =g0p8 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org DISCLAIMER: This electronic mail message and any attached files contain information intended for the exclusive use of the intended addressee and may contain information that is proprietary, privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any viewing, copying, disclosure or distribution of this information may be subject to legal restriction or sanction. Please notify sender if you are an unintended recipient and delete the original message without making copies. Thank you.