Re: tomcat logging
Hi Alan, On 09.06.22 12:56, Alan F wrote: > Tomcat logging > > I would like to add a delimiter or characters " " around {user-agent} for > logging, I wanted it in double quotes for example "Mozilla 5.0.." but can't > seem to make it work. Or even adding a # symbol before would help any ideas? I assume, you refer to access logging. Recent Tomcat has a proper example already in the standard server.xml (IIRC for a long time), just use the " XML entity, where you need it (taken from 9.0.64): If you are happy with a standard combined pattern, just use pattern="combined", it contains user agent in double quotes. See https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Access_Log_Valve for complete pattern information. hth, Thomas - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat logging
Tomcat logging I would like to add a delimiter or characters " " around {user-agent} for logging, I wanted it in double quotes for example "Mozilla 5.0.." but can't seem to make it work. Or even adding a # symbol before would help any ideas? Thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Logging for POST returning a 500 (Internal Server Error)
Hi, I am trying to troubleshoot a GWT application that I have deployed to a tomcat server (Apache Tomcat/7.0.55), running on a Bitnami stack (Ubuntu 14.04.1) at AWS. The initial web page loads just fine, but the first servlet RPC call I make fails. The servlet has various logging built in, it's the first thing the constructor does, but even that is not occurring. I looked in the tomcat logs, here is the only logging that is occurring (at least that I can find) for the application: /opt/bitnami/apache-tomcat/logs/localhost_access_log.2016-04-07.txt (ip address obfuscated): xxx.xx.xx.xxx - - [07/Apr/2016:09:48:58 -0400] "GET /Questionnaire/ HTTP/1.1" 200 2159 xxx.xx.xx.xxx - - [07/Apr/2016:09:48:59 -0400] "GET /Questionnaire/questionnaire/questionnaire.nocache.js HTTP/1.1" 200 7455 xxx.xx.xx.xxx - - [07/Apr/2016:09:48:59 -0400] "GET /Questionnaire/questionnaire/gwt/clean/clean.css HTTP/1.1" 200 29390 xxx.xx.xx.xxx - - [07/Apr/2016:09:49:00 -0400] "GET /Questionnaire/questionnaire/DAB2DC6857E97DCA965B766CA77B6F8B.cache.js HTTP/1.1" 200 139323 xxx.xx.xx.xxx - - [07/Apr/2016:09:49:00 -0400] "GET /Questionnaire/questionnaire/gwt/clean/images/hborder.png HTTP/1.1" 200 1995 xxx.xx.xx.xxx - - [07/Apr/2016:09:49:21 -0400] "POST /Questionnaire/questionnaire/rpc HTTP/1.1" 500 2972 So I can see that there is a "500" error occuring when the RPC call is made (Internal Server Error). I would expect more info to be in the catalina log, but there is nothing at all. Other files in tomcat's logs directory are: catalina-daemon.out manager.2016-04-06.log catalina.2016-04-06.log localhost.2016-04-06.log But none of the entries in them are from today. Other GWT applications deployed to the same tomcat server are working just fine. How should I go about troubleshooting this problem? Surely tomcat must have a way of logging more detail on a 500 - Internal Server Error? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat logging with Log4j
Sorry, > I'm not sure why you want to log to the console (stdout), but it looks like > you've managed to do it. I think is was put in a long time ago (in a bad way) and never changed to a better way. Our developers changed To this in our logback.xml logFile.log logFile.%d{-MM-dd}.%i.log 180 100MB %date [%thread] %-5level %logger{35} - %msg%n -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Thursday, April 17, 2014 4:41 PM To: Tomcat Users List Subject: Re: Tomcat logging with Log4j -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Scott, On 4/16/14, 10:15 AM, Scott Bailey wrote: > I was able to get one of our developers and it was simple for them to > add the logging for our app to the logback we are using a file and add > logging rotation. My issue is resolved. Thanks for the help though. Glad to hear you got your issue fixed, though you didn't actually tell us how it was fixed. It would help others if you would explain what you had to do to fix this. I'm not sure why you want to log to the console (stdout), but it looks like you've managed to do it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTUEp7AAoJEBzwKT+lPKRYh1IQALT16jdmdy0HvjEIW2NS638b 7NyAmq/VamC2bYMcSwnpc3Zb2MpyJBkpG/dpfEIq14yYf9oqw9veC55hczrTI2YB Fov95SLzH1e0fnH5tBWTxfS7xGxImv+pI3691gMMElCeR35yrGeNuhdM9sPB22IY +JjOuX8gDTkI3m5Jq1r2UWe4inLjOneZp3sk5C7esxG8DV4yHUe6C5MFr0+RxsbH ofZQaaOi+x2PH79vk28YSPB+7OTHf156UhSohFF8jHT5ue1vwl6XqaABjLy79z6Q ZtCIfudTzKU31FMRJWarD4glHNkKfs+3t6Hw/VKnl6NeS+GnVQYvLDpxhfuKG9Ar akwQipRaoeudFJSXIu39U8YgrJBYTQFVgMjt4aH3eIdXPhpkC7/hMhuQ2kdXRfgw pW4L9s2nwaCXN13IOcOOS4CgaXkfXr+DVi7W+zZPVPK0AYmraOCDLrpaRwBJXQvW 5TTqCAfU1SmYDsPrSIjpwFzE4sq8GododUm8lWL2zH+BfOLXFI2Pboy2ji3vpVHU CKiPhgB+N7zezULlwhZ09gmZOLLb3zBg6q/oFzTwZC9oCX5AN0ziEzi00lLgWf5Q 6y2AN/0zvGv2MziWvWZCrOzL6yyKEscdH5S9O0M1r6FF/BKRH8V95Y7emdnX5ShT M9cojCEJ9nl3LMzZ697s =hPD6 -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.
Re: Tomcat logging with Log4j
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Scott, On 4/16/14, 10:15 AM, Scott Bailey wrote: > I was able to get one of our developers and it was simple for them > to add the logging for our app to the logback we are using a file > and add logging rotation. My issue is resolved. Thanks for the > help though. Glad to hear you got your issue fixed, though you didn't actually tell us how it was fixed. It would help others if you would explain what you had to do to fix this. I'm not sure why you want to log to the console (stdout), but it looks like you've managed to do it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTUEp7AAoJEBzwKT+lPKRYh1IQALT16jdmdy0HvjEIW2NS638b 7NyAmq/VamC2bYMcSwnpc3Zb2MpyJBkpG/dpfEIq14yYf9oqw9veC55hczrTI2YB Fov95SLzH1e0fnH5tBWTxfS7xGxImv+pI3691gMMElCeR35yrGeNuhdM9sPB22IY +JjOuX8gDTkI3m5Jq1r2UWe4inLjOneZp3sk5C7esxG8DV4yHUe6C5MFr0+RxsbH ofZQaaOi+x2PH79vk28YSPB+7OTHf156UhSohFF8jHT5ue1vwl6XqaABjLy79z6Q ZtCIfudTzKU31FMRJWarD4glHNkKfs+3t6Hw/VKnl6NeS+GnVQYvLDpxhfuKG9Ar akwQipRaoeudFJSXIu39U8YgrJBYTQFVgMjt4aH3eIdXPhpkC7/hMhuQ2kdXRfgw pW4L9s2nwaCXN13IOcOOS4CgaXkfXr+DVi7W+zZPVPK0AYmraOCDLrpaRwBJXQvW 5TTqCAfU1SmYDsPrSIjpwFzE4sq8GododUm8lWL2zH+BfOLXFI2Pboy2ji3vpVHU CKiPhgB+N7zezULlwhZ09gmZOLLb3zBg6q/oFzTwZC9oCX5AN0ziEzi00lLgWf5Q 6y2AN/0zvGv2MziWvWZCrOzL6yyKEscdH5S9O0M1r6FF/BKRH8V95Y7emdnX5ShT M9cojCEJ9nl3LMzZ697s =hPD6 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat logging with Log4j
I was able to get one of our developers and it was simple for them to add the logging for our app to the logback we are using a file and add logging rotation. My issue is resolved. Thanks for the help though. -Original Message- From: Scott Bailey [mailto:sbai...@donlen.com] Sent: Tuesday, April 15, 2014 3:15 PM To: Tomcat Users List Subject: RE: Tomcat logging with Log4j 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. 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. B CB [ X ܚX KK[XZ[ \ \ ][ X ܚX P X ] \X K ܙ B ܈Y][ۘ[ [X[ K[XZ[ \ \ Z[ X ] \X K ܙ B 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.
RE: Tomcat logging with Log4j
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. 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.
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
Tomcat logging with Log4j
Hi all, 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. Does something need to be changed in log4j.properties to still capture stdout and stderr to log file with Log4j? We are running Tomcat as a windows service on 2008 R2 with Java 7. Thank you! Scott 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.
Tomcat logging for Internal Server Errors (500)
Hi All, I need some help tracking down a random infrequent Internal Server Error that isn’t getting logged anywhere. I’m using Tomcat 7.0.53 behind apache httpd with mod_jk 1.2.39. I use new relic application monitoring, and I see in their application error reports that a 500 error from tomcat is occasionally being thrown. I have configured tomcat for global log4j logging as follows, as described on the tomcat site for global log4j logging, including replacing the tomcat-juli.jar file and adding the adapter and log4j itself to the lib directory. Tomcat is logging information at startup, so I know it’s setup correctly in general. log4j.properties file == log4j.rootLogger=INFO, CATALINA # Define all the appenders log4j.appender.CATALINA=org.apache.log4j.DailyRollingFileAppender log4j.appender.CATALINA.File=${catalina.base}/logs/tomcat.log log4j.appender.CATALINA.Append=true log4j.appender.CATALINA.Encoding=UTF-8 # Roll-over the log once per day log4j.appender.CATALINA.DatePattern='.'-MM-dd'.log' log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout log4j.appender.CATALINA.layout.ConversionPattern = %d [%t] %-5p %c- %m%n log4j.appender.APP=org.apache.log4j.DailyRollngFileAppender log4j.appender.APP.File=${catalina.base}/logs/soc.log log4j.appender.APP.Append=true log4j.appender.APP.Encoding=UTF-8 # Roll-over the log once per day log4j.appender.APP.DatePattern='.'-MM-dd'.log' log4j.appender.APP.layout = org.apache.log4j.PatternLayout log4j.appender.APP.layout.ConversionPattern = %d [%t] %-5p %c- %m%n # Configure which loggers log to which appenders log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[ops-center.opterus.net].[/]=INFO, APP #log4j.logger.org.apache.catalina=INFO, CATALINA I also use log4j logging in my web application, which is logging errors in other cases, so I’m assuming the the request isn’t actually getting through to my code. Do I have to tweak some logging parameters to get Tomcat to log those errors? I have looked at the debug log from mod_jk and Tomcat doesn’t return much to mod_jk other than the Internal Server Error text along with the text encoding. The request itself looks the same as a request that succeeds. Any suggestions? Thanks in advance! Cheers, Ian
Re: Configure Tomcat Logging Programmatically
Hi, Calling tomcat.setSilent(false) might help. Just try this and see if this helps. Below is small funcation from Tomcat class. /** * Controls if the loggers will be silenced or not. * @param silenttrue sets the log level to WARN for the * loggers that log information on Tomcat start up. This * prevents the usual startup information being logged. * false sets the log level to the default * level of INFO. */ public void setSilent(boolean silent) { for (String s : silences) { if (silent) { Logger.getLogger(s).setLevel(Level.WARNING); } else { Logger.getLogger(s).setLevel(Level.INFO); } } } On Mon, Dec 9, 2013 at 11:16 AM, Matthew Westwood-Hill < matthew.westwood-h...@nuix.com> wrote: > I am running Tomcat programmatically (embedded) and I wanted to configure > its logging so I can track inbound request. > > > > I start Tomcat as follows: > > > > tomcat = new Tomcat(); > > tomcat.setBaseDir(DEFAULT_BASE_DIR); > > tomcat.getService().addConnector(defaultConnector); > > tomcat.setConnector(defaultConnector); > > tomcat.init(); > > tomcat.start(); > > > > How do I go about configuring the logging? > > > > Cheers, > > Matt >
Configure Tomcat Logging Programmatically
I am running Tomcat programmatically (embedded) and I wanted to configure its logging so I can track inbound request. I start Tomcat as follows: tomcat = new Tomcat(); tomcat.setBaseDir(DEFAULT_BASE_DIR); tomcat.getService().addConnector(defaultConnector); tomcat.setConnector(defaultConnector); tomcat.init(); tomcat.start(); How do I go about configuring the logging? Cheers, Matt
Re: Tomcat logging, request
"André Warnier" wrote: >Christopher Schultz wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA256 >> >> André, >> >> On 10/25/13, 7:18 AM, André Warnier wrote: >>> For example, a utility such as logrotate, in the sysadmin world, is >>> like a gift of God. Most server-like programs allow logrotate to >>> rotate their logfiles, compress old ones, remove even older ones, >>> etc. to keep things running smoothly over time. It's a simple >>> thing, but it saves many hours that would otherwise have to be >>> dedicated to monitoring and reacting to such repetitive >>> occurrences. >>> >>> Tomcat, at this moment, does not really allow that. >> >> It does, but it's not terribly obvious how to do it. >> >> Here are some ways to do it: >> >> 1. Modify catalina.sh to pipe | instead of redirect > >> 2. Use "catalina.sh start | chronolog" or whatever >> 3. Configure logrotate to copy-and-truncate >> 4. Set CATALINA_OUT=/dev/null before launching >> 5. Set up a named pipe and set CATALINA_OUT to it before launching >>(Plus have another process drain that pipe) >> >>> That is because there is no simple mechanism to tell Tomcat to >>> relinquish control of its current logfiles for a moment, short of >>> stopping Tomcat completely and restarting it (which interrupts the >>> service, sometimes for a significant amount of time). >> >> What happens in httpd if I write a module that writes to stdout >> instead of the proper httpd-provided logging mechanisms? > >The module's stdout/stderr is redirected to the Apache error log. > >> >>> So my request is simple (at least to express) : can someone among >>> the Tomcat luminaries not imagine a mechanism by which Tomcat >>> would, on request from an external program or script, do something >>> like the Apache httpd does during a "soft reload" : wait for the >>> current requests to terminate, close all logfiles and re-open them >>> ? For example : there already exist a "shutdown port", and a bunch >>> of "Listeners". Could there not be a "logs rotate port" or a >>> "logrotate listener" ? >> >> It seems like this could be done via the manager webapp. >> >>> I am not underestimating the possible difficulty of the task, and >>> probably tackling such an issue is ultimately less rewarding for a >>> developer than implementing the latest in webapp or HTTP >>> technology. >>> >>> But many sysadmins worldwide would be grateful if this came to pass >>> and I am sure that it would do a great deal to increase the >>> popularity of Tomcat among them. >> >> Honestly, the only time this is really a problem is when catalina.out >> is filling-up with junk, right? It's always awkward when that >happens. >> > >Yes, but the point is : the sysadmins do not generally control the code >of the webapps. >They are just told to run them. And there are a lot of webapps that >write to stdout. >That's precisely the case of the last OP who posted about this. But >not only /his/ >problem, by any means. Would this help solve the problem? https://issues.apache.org/bugzilla/show_bug.cgi?id=53930 If so, the number of votes for an enhancement is one of the factors I take into account when trying to figure out which enhancement request to look at next. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat logging, request
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 10/25/13, 7:18 AM, André Warnier wrote: For example, a utility such as logrotate, in the sysadmin world, is like a gift of God. Most server-like programs allow logrotate to rotate their logfiles, compress old ones, remove even older ones, etc. to keep things running smoothly over time. It's a simple thing, but it saves many hours that would otherwise have to be dedicated to monitoring and reacting to such repetitive occurrences. Tomcat, at this moment, does not really allow that. It does, but it's not terribly obvious how to do it. Here are some ways to do it: 1. Modify catalina.sh to pipe | instead of redirect > 2. Use "catalina.sh start | chronolog" or whatever 3. Configure logrotate to copy-and-truncate 4. Set CATALINA_OUT=/dev/null before launching 5. Set up a named pipe and set CATALINA_OUT to it before launching (Plus have another process drain that pipe) That is because there is no simple mechanism to tell Tomcat to relinquish control of its current logfiles for a moment, short of stopping Tomcat completely and restarting it (which interrupts the service, sometimes for a significant amount of time). What happens in httpd if I write a module that writes to stdout instead of the proper httpd-provided logging mechanisms? The module's stdout/stderr is redirected to the Apache error log. So my request is simple (at least to express) : can someone among the Tomcat luminaries not imagine a mechanism by which Tomcat would, on request from an external program or script, do something like the Apache httpd does during a "soft reload" : wait for the current requests to terminate, close all logfiles and re-open them ? For example : there already exist a "shutdown port", and a bunch of "Listeners". Could there not be a "logs rotate port" or a "logrotate listener" ? It seems like this could be done via the manager webapp. I am not underestimating the possible difficulty of the task, and probably tackling such an issue is ultimately less rewarding for a developer than implementing the latest in webapp or HTTP technology. But many sysadmins worldwide would be grateful if this came to pass and I am sure that it would do a great deal to increase the popularity of Tomcat among them. Honestly, the only time this is really a problem is when catalina.out is filling-up with junk, right? It's always awkward when that happens. Yes, but the point is : the sysadmins do not generally control the code of the webapps. They are just told to run them. And there are a lot of webapps that write to stdout. That's precisely the case of the last OP who posted about this. But not only /his/ problem, by any means. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.15 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSarrOAAoJEBzwKT+lPKRYvm0QAJUo2B+jCjZhRVttEgIHrTcU BfPwRChIfExcfxPN5dSHU+0036tkle+TT7IUgIqbqnB2xSVNaZ4gChCyA+n6O54V eAMQqgYxTDdCggJbd3MFAfdTvbApQWYjbRRn44iyHufEaxiLjTDohkzdjNTzErIf g6CwoEs9ZS+DaRFR6Q1vxBg+QlcJOaruFNaRtJ+td/8yHSFDu+0w/EkBug9woewi GxcjaqiS0yujRC935oIbeCWI2sPswQHSTYA5Y2NY5rXtU2BCqAho5LRh+G0I8w7j dv/KPXfxHQDRw8R1xrE1D9y94tpNM7aHr/+xiVYQ/jBg2AE+hxT8FNi7LyP4Wcpr 7TXEdxFJMaKTujELTpP6SdZKmf/ic8EKeGSUaOFmebrlsB7MYzS0XFp87oKQsz4V +TXrvEKgx86xSTbWfJ9zq8fWrsq0HbIXOTVyItEVF8LZ1o15JBydwTm17d0XaQip dy+hG7t9NZorjL3hbRe0AOBZx//+E0VtrBfglFnbrWIyVMyot0nxhN0AzSo+HEtf stqUXTzOeJWhYzq3863rhZDxfA/p39u3qpjQs+V8gr+wW32i2Ya8CwJRfuLC4oeG FzkV8cbmS0yfp5WK1PktfX/ILw2uZVwpnHSZwFxkJ2DOginD7LRDh7MeogH4HBux YA+NtGl65CkNimI8Mpj/ =X+tw -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat logging, request
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 10/25/13, 7:18 AM, André Warnier wrote: > For example, a utility such as logrotate, in the sysadmin world, is > like a gift of God. Most server-like programs allow logrotate to > rotate their logfiles, compress old ones, remove even older ones, > etc. to keep things running smoothly over time. It's a simple > thing, but it saves many hours that would otherwise have to be > dedicated to monitoring and reacting to such repetitive > occurrences. > > Tomcat, at this moment, does not really allow that. It does, but it's not terribly obvious how to do it. Here are some ways to do it: 1. Modify catalina.sh to pipe | instead of redirect > 2. Use "catalina.sh start | chronolog" or whatever 3. Configure logrotate to copy-and-truncate 4. Set CATALINA_OUT=/dev/null before launching 5. Set up a named pipe and set CATALINA_OUT to it before launching (Plus have another process drain that pipe) > That is because there is no simple mechanism to tell Tomcat to > relinquish control of its current logfiles for a moment, short of > stopping Tomcat completely and restarting it (which interrupts the > service, sometimes for a significant amount of time). What happens in httpd if I write a module that writes to stdout instead of the proper httpd-provided logging mechanisms? > So my request is simple (at least to express) : can someone among > the Tomcat luminaries not imagine a mechanism by which Tomcat > would, on request from an external program or script, do something > like the Apache httpd does during a "soft reload" : wait for the > current requests to terminate, close all logfiles and re-open them > ? For example : there already exist a "shutdown port", and a bunch > of "Listeners". Could there not be a "logs rotate port" or a > "logrotate listener" ? It seems like this could be done via the manager webapp. > I am not underestimating the possible difficulty of the task, and > probably tackling such an issue is ultimately less rewarding for a > developer than implementing the latest in webapp or HTTP > technology. > > But many sysadmins worldwide would be grateful if this came to pass > and I am sure that it would do a great deal to increase the > popularity of Tomcat among them. Honestly, the only time this is really a problem is when catalina.out is filling-up with junk, right? It's always awkward when that happens. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.15 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSarrOAAoJEBzwKT+lPKRYvm0QAJUo2B+jCjZhRVttEgIHrTcU BfPwRChIfExcfxPN5dSHU+0036tkle+TT7IUgIqbqnB2xSVNaZ4gChCyA+n6O54V eAMQqgYxTDdCggJbd3MFAfdTvbApQWYjbRRn44iyHufEaxiLjTDohkzdjNTzErIf g6CwoEs9ZS+DaRFR6Q1vxBg+QlcJOaruFNaRtJ+td/8yHSFDu+0w/EkBug9woewi GxcjaqiS0yujRC935oIbeCWI2sPswQHSTYA5Y2NY5rXtU2BCqAho5LRh+G0I8w7j dv/KPXfxHQDRw8R1xrE1D9y94tpNM7aHr/+xiVYQ/jBg2AE+hxT8FNi7LyP4Wcpr 7TXEdxFJMaKTujELTpP6SdZKmf/ic8EKeGSUaOFmebrlsB7MYzS0XFp87oKQsz4V +TXrvEKgx86xSTbWfJ9zq8fWrsq0HbIXOTVyItEVF8LZ1o15JBydwTm17d0XaQip dy+hG7t9NZorjL3hbRe0AOBZx//+E0VtrBfglFnbrWIyVMyot0nxhN0AzSo+HEtf stqUXTzOeJWhYzq3863rhZDxfA/p39u3qpjQs+V8gr+wW32i2Ya8CwJRfuLC4oeG FzkV8cbmS0yfp5WK1PktfX/ILw2uZVwpnHSZwFxkJ2DOginD7LRDh7MeogH4HBux YA+NtGl65CkNimI8Mpj/ =X+tw -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat logging, request
Hi. This is a humble request to the Tomcat developers. First an introduction : This is a mailing list dedicated to helping people use Tomcat, and by extension java webapps and java itself. So it is normal that an overwhelming number of the people who are accessing this list and its archives would be java and java webapp developers, for which some of the things I mention below will sound like the ABC of the business. But Tomcat also has another class of users : the thousands of sysadmins who set up and keep running "bare Tomcats", and allow all these great Tomcat-based webapps to run. From such a sysadmin's point of view, Tomcat (and all its webapps), is one application which runs on a server, among tens or hundreds of them. A part of a sysadmin's job is usually to keep these applications running, which includes seeing to it that their logfiles can be easily found, allow the diagnosis of a problem when it occurs, but also that they do not fill the disk and ultimately prevent other things from running. There are many applications, on sometimes many systems, to be configured and monitored in this way, so that anything which generally makes that task easier is very welcome. For example, a utility such as logrotate, in the sysadmin world, is like a gift of God. Most server-like programs allow logrotate to rotate their logfiles, compress old ones, remove even older ones, etc. to keep things running smoothly over time. It's a simple thing, but it saves many hours that would otherwise have to be dedicated to monitoring and reacting to such repetitive occurrences. Tomcat, at this moment, does not really allow that. That is because there is no simple mechanism to tell Tomcat to relinquish control of its current logfiles for a moment, short of stopping Tomcat completely and restarting it (which interrupts the service, sometimes for a significant amount of time). To this there will probably be a number of answers indicating that Tomcat's Juli or log4j or whatever already provide ways to achieve this. I don't want to get into the debate consisting of deciding whether it should be the developer of an application, or the sysadmin who runs it, who ultimately decides what an application is logging and where it does it. But the thing is that these tens of thousands of sysadmins do not necessarily want to learn java, or learn the intricacies ot Tomcat, or even learn how to configure and setup Juli or log4j, just for the sake of this one Tomcat application among many running on their systems. So my request is simple (at least to express) : can someone among the Tomcat luminaries not imagine a mechanism by which Tomcat would, on request from an external program or script, do something like the Apache httpd does during a "soft reload" : wait for the current requests to terminate, close all logfiles and re-open them ? For example : there already exist a "shutdown port", and a bunch of "Listeners". Could there not be a "logs rotate port" or a "logrotate listener" ? I am not underestimating the possible difficulty of the task, and probably tackling such an issue is ultimately less rewarding for a developer than implementing the latest in webapp or HTTP technology. But many sysadmins worldwide would be grateful if this came to pass and I am sure that it would do a great deal to increase the popularity of Tomcat among them. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Jarhell
Correct -- a typo. WEB-INF/classes -- Chris On Wed, Mar 14, 2012 at 10:20 AM, Mark Thomas wrote: > On 14/03/2012 14:04, Christopher Gross wrote: >> After reverting -- all but one of my logs are working correctly. Each >> web app has a log4j jar and the commons logging jars in its >> WEB-INF/lib, and a log4j.properties in the WEB-INF/class. I didn't >> change that file at all. >> >> Any ideas as to why the one set of log files aren't being written to? > > WEB-INF/classes vs. WEB-INF/class or was that just a typo? > > Mark > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Jarhell
On 14/03/2012 14:04, Christopher Gross wrote: > After reverting -- all but one of my logs are working correctly. Each > web app has a log4j jar and the commons logging jars in its > WEB-INF/lib, and a log4j.properties in the WEB-INF/class. I didn't > change that file at all. > > Any ideas as to why the one set of log files aren't being written to? WEB-INF/classes vs. WEB-INF/class or was that just a typo? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Jarhell
After reverting -- all but one of my logs are working correctly. Each web app has a log4j jar and the commons logging jars in its WEB-INF/lib, and a log4j.properties in the WEB-INF/class. I didn't change that file at all. Any ideas as to why the one set of log files aren't being written to? -- Chris On Wed, Mar 14, 2012 at 8:42 AM, Christopher Gross wrote: > That section just gives some basic info, but nothing that tries to > help with what I'm doing. I'm well aware what the directories are > for. > > There are a lot of libraries that my apps have in common, and because > of the nature of the project, I need to try to conserve space. By > moving jars to a shared spot, I can trim off a decent amount of space. > > The individual app's code gets updated, but we rarely update the > supporting jars, unless it is absolutely needed. It doesn't matter > anyways, we can always drop a newer version of a supporting jar in the > web app's WEB-INF/lib and it will be used before the others in > common/lib or shared/lib get loaded. That's what the documentation > says, anyway. > > 5.5.25 is our standard deployment. We haven't moved up, and perhaps > later I'll do that. However, this same problem would arise, > regardless of the version, and I was just trying to provide enough > about my situation so that I could find appropriate assistance. > > While I can appreciate some constructive criticism, I'd rather have > answers to my questions, as opposed to questions about my design. > > -- Chris > > > > On Tue, Mar 13, 2012 at 4:17 PM, Konstantin Kolinko > wrote: >> 2012/3/13 Christopher Gross : >>> Hi all. >>> >>> I'm trying to utilize the common/lib and shared/lib directories on >>> Tomcat 5.5.25. I have a few separate apps that were each using many >>> of the same JAR files, so I have been moving them down to shared & >>> common lib (DB stuff went to common/lib, the apache commons modules & >>> others went to the shared/lib). I was doing testing as I went along >>> -- but I never went to look at the logfiles for my webapps. I'm now >>> noticing that they aren't getting anything anymore. I haven't changed >>> anything aside from moving the JARs around. I'm using the Apache >>> Log4j Logger in my classes. >>> >>> I have: >>> shared/lib: >>> commons-logging-1.0.4.jar >>> commons-logging-api.jar >>> commons-logging.jar >>> >>> common/lib: >>> apache-log4j-extras-1.0.jar >>> log4j-1.2.15.jar >>> >>> each app has: >>> commons-logging-1.0.4.jar >>> commons-logging-api.jar >>> commons-logging.jar >>> >>> I'd like to avoid rolling back to how everything was, with a lot of >>> repeated JAR files all over the place. Has anyone run into a similar >>> problem and found a decent solution? >>> >> >> 1. You have to read "Class Loading" page of the user manual. >> >> Then I hope that you will note that it is a bad idea to move >> everything into common/lib or shared/lib. >> >> 2. If you have foo-x.y.z in your libs folder that will impede your >> efforts to upgrade some webapps to foo-y.z.w. >> >> Is is better to limit what you put into the common libs folder to >> components that are needed by the server itself, like database >> drivers. >> >> 3. Why are you investing your time in several-years-old 5.5.25, and >> when the whole 5.5.x line is going to be abandoned in several months? >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Jarhell
That section just gives some basic info, but nothing that tries to help with what I'm doing. I'm well aware what the directories are for. There are a lot of libraries that my apps have in common, and because of the nature of the project, I need to try to conserve space. By moving jars to a shared spot, I can trim off a decent amount of space. The individual app's code gets updated, but we rarely update the supporting jars, unless it is absolutely needed. It doesn't matter anyways, we can always drop a newer version of a supporting jar in the web app's WEB-INF/lib and it will be used before the others in common/lib or shared/lib get loaded. That's what the documentation says, anyway. 5.5.25 is our standard deployment. We haven't moved up, and perhaps later I'll do that. However, this same problem would arise, regardless of the version, and I was just trying to provide enough about my situation so that I could find appropriate assistance. While I can appreciate some constructive criticism, I'd rather have answers to my questions, as opposed to questions about my design. -- Chris On Tue, Mar 13, 2012 at 4:17 PM, Konstantin Kolinko wrote: > 2012/3/13 Christopher Gross : >> Hi all. >> >> I'm trying to utilize the common/lib and shared/lib directories on >> Tomcat 5.5.25. I have a few separate apps that were each using many >> of the same JAR files, so I have been moving them down to shared & >> common lib (DB stuff went to common/lib, the apache commons modules & >> others went to the shared/lib). I was doing testing as I went along >> -- but I never went to look at the logfiles for my webapps. I'm now >> noticing that they aren't getting anything anymore. I haven't changed >> anything aside from moving the JARs around. I'm using the Apache >> Log4j Logger in my classes. >> >> I have: >> shared/lib: >> commons-logging-1.0.4.jar >> commons-logging-api.jar >> commons-logging.jar >> >> common/lib: >> apache-log4j-extras-1.0.jar >> log4j-1.2.15.jar >> >> each app has: >> commons-logging-1.0.4.jar >> commons-logging-api.jar >> commons-logging.jar >> >> I'd like to avoid rolling back to how everything was, with a lot of >> repeated JAR files all over the place. Has anyone run into a similar >> problem and found a decent solution? >> > > 1. You have to read "Class Loading" page of the user manual. > > Then I hope that you will note that it is a bad idea to move > everything into common/lib or shared/lib. > > 2. If you have foo-x.y.z in your libs folder that will impede your > efforts to upgrade some webapps to foo-y.z.w. > > Is is better to limit what you put into the common libs folder to > components that are needed by the server itself, like database > drivers. > > 3. Why are you investing your time in several-years-old 5.5.25, and > when the whole 5.5.x line is going to be abandoned in several months? > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Jarhell
2012/3/13 Christopher Gross : > Hi all. > > I'm trying to utilize the common/lib and shared/lib directories on > Tomcat 5.5.25. I have a few separate apps that were each using many > of the same JAR files, so I have been moving them down to shared & > common lib (DB stuff went to common/lib, the apache commons modules & > others went to the shared/lib). I was doing testing as I went along > -- but I never went to look at the logfiles for my webapps. I'm now > noticing that they aren't getting anything anymore. I haven't changed > anything aside from moving the JARs around. I'm using the Apache > Log4j Logger in my classes. > > I have: > shared/lib: > commons-logging-1.0.4.jar > commons-logging-api.jar > commons-logging.jar > > common/lib: > apache-log4j-extras-1.0.jar > log4j-1.2.15.jar > > each app has: > commons-logging-1.0.4.jar > commons-logging-api.jar > commons-logging.jar > > I'd like to avoid rolling back to how everything was, with a lot of > repeated JAR files all over the place. Has anyone run into a similar > problem and found a decent solution? > 1. You have to read "Class Loading" page of the user manual. Then I hope that you will note that it is a bad idea to move everything into common/lib or shared/lib. 2. If you have foo-x.y.z in your libs folder that will impede your efforts to upgrade some webapps to foo-y.z.w. Is is better to limit what you put into the common libs folder to components that are needed by the server itself, like database drivers. 3. Why are you investing your time in several-years-old 5.5.25, and when the whole 5.5.x line is going to be abandoned in several months? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Jarhell
Well, I think I'm just going to revert back -- was able to get one app working correctly with having the commons & log4j in its WEB-INF/lib. Thanks anyway! -- Chris On Tue, Mar 13, 2012 at 4:07 PM, Allen Reese wrote: > Oh you are right. I forgot that part. > > We have an ugly process that generates a log4j.xml that is used globally. > All of the logs are globbed together into a giant mess. > > As far as build time, we use maven and provided scope to exclude it. > > And most people here run a single instance of a single app. > > > --Allen > Yahoo!, Inc. > >> -Original Message- >> From: Christopher Gross [mailto:cogr...@gmail.com] >> Sent: Tuesday, March 13, 2012 1:01 PM >> To: Tomcat Users List >> Subject: Re: Tomcat Logging Jarhell >> >> http://publib.boulder.ibm.com/infocenter/initiate/v9r5/index.jsp?topic= >> %2Fcom.ibm.inspinstall.doc%2Ftopics%2Ft_inspinstall_configuring_log4j_l >> ogging_apachetomcat.html >> >> Having the logging items in the shared/lib means that the >> shared/classes needs to have a log4j.properties file. >> >> I dropped one of my log4j.properties files into that directory, and I >> was able to pipe log output there...anyone know how I can have a >> separate one for each app, so that the logfiles will be readable and >> not all mangled together? Outside of editing all the modules to use a >> named logger... >> >> -- Chris >> >> >> >> On Tue, Mar 13, 2012 at 3:53 PM, Christopher Gross >> wrote: >> > Allen -- Is there something in particular that your users need to do >> > for the common logging? Any changes in the file or the setup of >> their >> > web app? >> > >> > An example of the log4j.properties file from a WEB-INF/classes dir: >> > >> > log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender >> > log4j.appender.A1.layout=org.apache.log4j.PatternLayout >> > log4j.appender.A1.layout.ConversionPattern=%d %-5p %c - %m%n >> > log4j.appender.A1.File=/test/logs/app/console.log >> > >> > log4j.appender.AppAppender=org.apache.log4j.DailyRollingFileAppender >> > log4j.appender.AppAppender.layout=org.apache.log4j.PatternLayout >> > log4j.appender.AppAppender.layout.ConversionPattern=%d %-5p %c - %m%n >> > log4j.appender.AppAppender.File=/test/logs/app/app.log >> > >> > log4j.rootLogger=WARN, A1 >> > log4j.logger.opensearch=DEBUG,AppAppender >> > >> > -- Chris >> > >> > >> > >> > On Tue, Mar 13, 2012 at 3:43 PM, Allen Reese >> wrote: >> >> We have people exclude commons-logging, and log4j as our >> installation provides them for you in a common lib dir. >> >> >> >> --Allen Reese >> >> Yahoo!, Inc. >> >> >> >>> -Original Message- >> >>> From: Christopher Gross [mailto:cogr...@gmail.com] >> >>> Sent: Tuesday, March 13, 2012 12:41 PM >> >>> To: Tomcat Users List >> >>> Subject: Tomcat Logging Jarhell >> >>> >> >>> Hi all. >> >>> >> >>> I'm trying to utilize the common/lib and shared/lib directories >> on >> >>> Tomcat 5.5.25. I have a few separate apps that were each using >> many >> >>> of the same JAR files, so I have been moving them down to shared & >> >>> common lib (DB stuff went to common/lib, the apache commons modules >> >>> & others went to the shared/lib). I was doing testing as I went >> >>> along >> >>> -- but I never went to look at the logfiles for my webapps. I'm >> now >> >>> noticing that they aren't getting anything anymore. I haven't >> >>> changed anything aside from moving the JARs around. I'm using the >> >>> Apache Log4j Logger in my classes. >> >>> >> >>> I have: >> >>> shared/lib: >> >>> commons-logging-1.0.4.jar >> >>> commons-logging-api.jar >> >>> commons-logging.jar >> >>> >> >>> common/lib: >> >>> apache-log4j-extras-1.0.jar >> >>> log4j-1.2.15.jar >> >>> >> >>> each app has: >> >>> commons-logging-1.0.4.jar >> >>> commons-logging-api.jar >> >>> commons-logging.jar >> >>> >> >>> I'd like to avoid rolling back to how everything was, with a lot of
RE: Tomcat Logging Jarhell
Oh you are right. I forgot that part. We have an ugly process that generates a log4j.xml that is used globally. All of the logs are globbed together into a giant mess. As far as build time, we use maven and provided scope to exclude it. And most people here run a single instance of a single app. --Allen Yahoo!, Inc. > -Original Message- > From: Christopher Gross [mailto:cogr...@gmail.com] > Sent: Tuesday, March 13, 2012 1:01 PM > To: Tomcat Users List > Subject: Re: Tomcat Logging Jarhell > > http://publib.boulder.ibm.com/infocenter/initiate/v9r5/index.jsp?topic= > %2Fcom.ibm.inspinstall.doc%2Ftopics%2Ft_inspinstall_configuring_log4j_l > ogging_apachetomcat.html > > Having the logging items in the shared/lib means that the > shared/classes needs to have a log4j.properties file. > > I dropped one of my log4j.properties files into that directory, and I > was able to pipe log output there...anyone know how I can have a > separate one for each app, so that the logfiles will be readable and > not all mangled together? Outside of editing all the modules to use a > named logger... > > -- Chris > > > > On Tue, Mar 13, 2012 at 3:53 PM, Christopher Gross > wrote: > > Allen -- Is there something in particular that your users need to do > > for the common logging? Any changes in the file or the setup of > their > > web app? > > > > An example of the log4j.properties file from a WEB-INF/classes dir: > > > > log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender > > log4j.appender.A1.layout=org.apache.log4j.PatternLayout > > log4j.appender.A1.layout.ConversionPattern=%d %-5p %c - %m%n > > log4j.appender.A1.File=/test/logs/app/console.log > > > > log4j.appender.AppAppender=org.apache.log4j.DailyRollingFileAppender > > log4j.appender.AppAppender.layout=org.apache.log4j.PatternLayout > > log4j.appender.AppAppender.layout.ConversionPattern=%d %-5p %c - %m%n > > log4j.appender.AppAppender.File=/test/logs/app/app.log > > > > log4j.rootLogger=WARN, A1 > > log4j.logger.opensearch=DEBUG,AppAppender > > > > -- Chris > > > > > > > > On Tue, Mar 13, 2012 at 3:43 PM, Allen Reese > wrote: > >> We have people exclude commons-logging, and log4j as our > installation provides them for you in a common lib dir. > >> > >> --Allen Reese > >> Yahoo!, Inc. > >> > >>> -Original Message- > >>> From: Christopher Gross [mailto:cogr...@gmail.com] > >>> Sent: Tuesday, March 13, 2012 12:41 PM > >>> To: Tomcat Users List > >>> Subject: Tomcat Logging Jarhell > >>> > >>> Hi all. > >>> > >>> I'm trying to utilize the common/lib and shared/lib directories > on > >>> Tomcat 5.5.25. I have a few separate apps that were each using > many > >>> of the same JAR files, so I have been moving them down to shared & > >>> common lib (DB stuff went to common/lib, the apache commons modules > >>> & others went to the shared/lib). I was doing testing as I went > >>> along > >>> -- but I never went to look at the logfiles for my webapps. I'm > now > >>> noticing that they aren't getting anything anymore. I haven't > >>> changed anything aside from moving the JARs around. I'm using the > >>> Apache Log4j Logger in my classes. > >>> > >>> I have: > >>> shared/lib: > >>> commons-logging-1.0.4.jar > >>> commons-logging-api.jar > >>> commons-logging.jar > >>> > >>> common/lib: > >>> apache-log4j-extras-1.0.jar > >>> log4j-1.2.15.jar > >>> > >>> each app has: > >>> commons-logging-1.0.4.jar > >>> commons-logging-api.jar > >>> commons-logging.jar > >>> > >>> I'd like to avoid rolling back to how everything was, with a lot of > >>> repeated JAR files all over the place. Has anyone run into a > >>> similar problem and found a decent solution? > >>> > >>> Any help/tips are appreciated. > >>> > >>> Thanks! > >>> > >>> -- Chris > >>> > >>> --- > - > >>> - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >>> For additional commands, e-mail: users-h...@tomcat.apache.org > >> > >> > >> > - > >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >> For additional commands, e-mail: users-h...@tomcat.apache.org > >> > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Jarhell
http://publib.boulder.ibm.com/infocenter/initiate/v9r5/index.jsp?topic=%2Fcom.ibm.inspinstall.doc%2Ftopics%2Ft_inspinstall_configuring_log4j_logging_apachetomcat.html Having the logging items in the shared/lib means that the shared/classes needs to have a log4j.properties file. I dropped one of my log4j.properties files into that directory, and I was able to pipe log output there...anyone know how I can have a separate one for each app, so that the logfiles will be readable and not all mangled together? Outside of editing all the modules to use a named logger... -- Chris On Tue, Mar 13, 2012 at 3:53 PM, Christopher Gross wrote: > Allen -- Is there something in particular that your users need to do > for the common logging? Any changes in the file or the setup of their > web app? > > An example of the log4j.properties file from a WEB-INF/classes dir: > > log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender > log4j.appender.A1.layout=org.apache.log4j.PatternLayout > log4j.appender.A1.layout.ConversionPattern=%d %-5p %c - %m%n > log4j.appender.A1.File=/test/logs/app/console.log > > log4j.appender.AppAppender=org.apache.log4j.DailyRollingFileAppender > log4j.appender.AppAppender.layout=org.apache.log4j.PatternLayout > log4j.appender.AppAppender.layout.ConversionPattern=%d %-5p %c - %m%n > log4j.appender.AppAppender.File=/test/logs/app/app.log > > log4j.rootLogger=WARN, A1 > log4j.logger.opensearch=DEBUG,AppAppender > > -- Chris > > > > On Tue, Mar 13, 2012 at 3:43 PM, Allen Reese wrote: >> We have people exclude commons-logging, and log4j as our installation >> provides them for you in a common lib dir. >> >> --Allen Reese >> Yahoo!, Inc. >> >>> -Original Message- >>> From: Christopher Gross [mailto:cogr...@gmail.com] >>> Sent: Tuesday, March 13, 2012 12:41 PM >>> To: Tomcat Users List >>> Subject: Tomcat Logging Jarhell >>> >>> Hi all. >>> >>> I'm trying to utilize the common/lib and shared/lib directories on >>> Tomcat 5.5.25. I have a few separate apps that were each using many of >>> the same JAR files, so I have been moving them down to shared & common >>> lib (DB stuff went to common/lib, the apache commons modules & others >>> went to the shared/lib). I was doing testing as I went along >>> -- but I never went to look at the logfiles for my webapps. I'm now >>> noticing that they aren't getting anything anymore. I haven't changed >>> anything aside from moving the JARs around. I'm using the Apache Log4j >>> Logger in my classes. >>> >>> I have: >>> shared/lib: >>> commons-logging-1.0.4.jar >>> commons-logging-api.jar >>> commons-logging.jar >>> >>> common/lib: >>> apache-log4j-extras-1.0.jar >>> log4j-1.2.15.jar >>> >>> each app has: >>> commons-logging-1.0.4.jar >>> commons-logging-api.jar >>> commons-logging.jar >>> >>> I'd like to avoid rolling back to how everything was, with a lot of >>> repeated JAR files all over the place. Has anyone run into a similar >>> problem and found a decent solution? >>> >>> Any help/tips are appreciated. >>> >>> Thanks! >>> >>> -- Chris >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Jarhell
Allen -- Is there something in particular that your users need to do for the common logging? Any changes in the file or the setup of their web app? An example of the log4j.properties file from a WEB-INF/classes dir: log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d %-5p %c - %m%n log4j.appender.A1.File=/test/logs/app/console.log log4j.appender.AppAppender=org.apache.log4j.DailyRollingFileAppender log4j.appender.AppAppender.layout=org.apache.log4j.PatternLayout log4j.appender.AppAppender.layout.ConversionPattern=%d %-5p %c - %m%n log4j.appender.AppAppender.File=/test/logs/app/app.log log4j.rootLogger=WARN, A1 log4j.logger.opensearch=DEBUG,AppAppender -- Chris On Tue, Mar 13, 2012 at 3:43 PM, Allen Reese wrote: > We have people exclude commons-logging, and log4j as our installation > provides them for you in a common lib dir. > > --Allen Reese > Yahoo!, Inc. > >> -Original Message- >> From: Christopher Gross [mailto:cogr...@gmail.com] >> Sent: Tuesday, March 13, 2012 12:41 PM >> To: Tomcat Users List >> Subject: Tomcat Logging Jarhell >> >> Hi all. >> >> I'm trying to utilize the common/lib and shared/lib directories on >> Tomcat 5.5.25. I have a few separate apps that were each using many of >> the same JAR files, so I have been moving them down to shared & common >> lib (DB stuff went to common/lib, the apache commons modules & others >> went to the shared/lib). I was doing testing as I went along >> -- but I never went to look at the logfiles for my webapps. I'm now >> noticing that they aren't getting anything anymore. I haven't changed >> anything aside from moving the JARs around. I'm using the Apache Log4j >> Logger in my classes. >> >> I have: >> shared/lib: >> commons-logging-1.0.4.jar >> commons-logging-api.jar >> commons-logging.jar >> >> common/lib: >> apache-log4j-extras-1.0.jar >> log4j-1.2.15.jar >> >> each app has: >> commons-logging-1.0.4.jar >> commons-logging-api.jar >> commons-logging.jar >> >> I'd like to avoid rolling back to how everything was, with a lot of >> repeated JAR files all over the place. Has anyone run into a similar >> problem and found a decent solution? >> >> Any help/tips are appreciated. >> >> Thanks! >> >> -- Chris >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Logging Jarhell
We have people exclude commons-logging, and log4j as our installation provides them for you in a common lib dir. --Allen Reese Yahoo!, Inc. > -Original Message- > From: Christopher Gross [mailto:cogr...@gmail.com] > Sent: Tuesday, March 13, 2012 12:41 PM > To: Tomcat Users List > Subject: Tomcat Logging Jarhell > > Hi all. > > I'm trying to utilize the common/lib and shared/lib directories on > Tomcat 5.5.25. I have a few separate apps that were each using many of > the same JAR files, so I have been moving them down to shared & common > lib (DB stuff went to common/lib, the apache commons modules & others > went to the shared/lib). I was doing testing as I went along > -- but I never went to look at the logfiles for my webapps. I'm now > noticing that they aren't getting anything anymore. I haven't changed > anything aside from moving the JARs around. I'm using the Apache Log4j > Logger in my classes. > > I have: > shared/lib: > commons-logging-1.0.4.jar > commons-logging-api.jar > commons-logging.jar > > common/lib: > apache-log4j-extras-1.0.jar > log4j-1.2.15.jar > > each app has: > commons-logging-1.0.4.jar > commons-logging-api.jar > commons-logging.jar > > I'd like to avoid rolling back to how everything was, with a lot of > repeated JAR files all over the place. Has anyone run into a similar > problem and found a decent solution? > > Any help/tips are appreciated. > > Thanks! > > -- Chris > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Logging Jarhell
Hi all. I'm trying to utilize the common/lib and shared/lib directories on Tomcat 5.5.25. I have a few separate apps that were each using many of the same JAR files, so I have been moving them down to shared & common lib (DB stuff went to common/lib, the apache commons modules & others went to the shared/lib). I was doing testing as I went along -- but I never went to look at the logfiles for my webapps. I'm now noticing that they aren't getting anything anymore. I haven't changed anything aside from moving the JARs around. I'm using the Apache Log4j Logger in my classes. I have: shared/lib: commons-logging-1.0.4.jar commons-logging-api.jar commons-logging.jar common/lib: apache-log4j-extras-1.0.jar log4j-1.2.15.jar each app has: commons-logging-1.0.4.jar commons-logging-api.jar commons-logging.jar I'd like to avoid rolling back to how everything was, with a lot of repeated JAR files all over the place. Has anyone run into a similar problem and found a decent solution? Any help/tips are appreciated. Thanks! -- Chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging and HTTP Header question
Pid wrote: There are Tomcat professors? I'd say that they fit right in with pet food tasters, dog walkers and chicken sexers, no ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging and HTTP Header question
On 02/12/2011 18:12, jmpaul012 wrote: > > Sorry I didn't mean to ask the questions as though this forum is my private > consulting firm. I have done everything I could before I posted on this > forum. I have searched google, experts exchange, asked coworkers, and asked > my previous Tomcat professor. I will use your suggestions and I hope I can > figure this out. Thanks! There are Tomcat professors? p > Christopher Schultz-2 wrote: >> > To whom it may concern, > > On 12/2/11 12:10 PM, jmpaul012 wrote: > So I am doing Tomcat STIGS and I am stuck on two of the STIGs. > > 1. How do I change what tomcat logs? I think it's something I > need to do in server.xml but I'm not sure. > > What have you tried so far? This is a community mailing list, not a > consulting agency. We're here to help, not to do things for you. > > This is what I need to log: > > • Date, Time • IP address of the host that initiated the request > • User ID supplied for HTTP authentication • HTTP Method • URL in > the request • The protocol and protocol version used to make the > request • Source and destination port numbers • Status codes for > the response • Size of the response in bytes • HTTP Status and > Referrer for the following events: > > That sounds a lot like an HTTP access log. Have you looked through the > "logging" documentation for your version of Tomcat for how to do > access logging? > > - Successful and unsuccessful attempts to access the web server > software. > > Depends upon your definition of "successful", "attempt", and "access". > > - Successful and unsuccessful attempts to access the web site. > > Ditto. > > - Successful and unsuccessful attempts to access the web > application. > > Ditto. > > 2. How do I view/change the HTTP header information of an > intranet site that is using Tomcat? I have to make sure the HTTP > header does not show information about the web server which would > include, web server product, version, or host operating system > > Generally speaking, it's nice to post different questions in separate > threads. It's not a huge deal, but it makes following a conversation > easier for others. > > Anyhow, you are looking for changing the "Server" response header, > right? That's in the documentation as well, but it might not be the > easiest thing to find. See below. > > Since you are looking at securing Tomcat, you might want to have a > look at the "Security Considerations" section of the Tomcat User Guide: > http://tomcat.apache.org/tomcat-7.0-doc/security-howto.html > > (Make sure you use the right version -- I chose TC 7 because you never > told us what you were running). > > Hope that helps, > -chris >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> > -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Tomcat Logging and HTTP Header question
Sorry I didn't mean to ask the questions as though this forum is my private consulting firm. I have done everything I could before I posted on this forum. I have searched google, experts exchange, asked coworkers, and asked my previous Tomcat professor. I will use your suggestions and I hope I can figure this out. Thanks! Christopher Schultz-2 wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > To whom it may concern, > > On 12/2/11 12:10 PM, jmpaul012 wrote: >>> So I am doing Tomcat STIGS and I am stuck on two of the STIGs. >>> >>> 1. How do I change what tomcat logs? I think it's something I >>> need to do in server.xml but I'm not sure. > > What have you tried so far? This is a community mailing list, not a > consulting agency. We're here to help, not to do things for you. > >>> This is what I need to log: >>> >>> • Date, Time • IP address of the host that initiated the request >>> • User ID supplied for HTTP authentication • HTTP Method • URL in >>> the request • The protocol and protocol version used to make the >>> request • Source and destination port numbers • Status codes for >>> the response • Size of the response in bytes • HTTP Status and >>> Referrer for the following events: > > That sounds a lot like an HTTP access log. Have you looked through the > "logging" documentation for your version of Tomcat for how to do > access logging? > >>> - Successful and unsuccessful attempts to access the web server >>> software. > > Depends upon your definition of "successful", "attempt", and "access". > >>> - Successful and unsuccessful attempts to access the web site. > > Ditto. > >>> - Successful and unsuccessful attempts to access the web >>> application. > > Ditto. > >>> 2. How do I view/change the HTTP header information of an >>> intranet site that is using Tomcat? I have to make sure the HTTP >>> header does not show information about the web server which would >>> include, web server product, version, or host operating system > > Generally speaking, it's nice to post different questions in separate > threads. It's not a huge deal, but it makes following a conversation > easier for others. > > Anyhow, you are looking for changing the "Server" response header, > right? That's in the documentation as well, but it might not be the > easiest thing to find. See below. > > Since you are looking at securing Tomcat, you might want to have a > look at the "Security Considerations" section of the Tomcat User Guide: > http://tomcat.apache.org/tomcat-7.0-doc/security-howto.html > > (Make sure you use the right version -- I chose TC 7 because you never > told us what you were running). > > Hope that helps, > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG/MacGPG2 v2.0.17 (Darwin) > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk7ZDaoACgkQ9CaO5/Lv0PB8QACgvfmekninLwMlIuafcwsG2WZ4 > HnAAni9XbJ15C0/wv0RgiJuCaZavt/wQ > =GVw2 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Tomcat-Logging-and-HTTP-Header-question-tp32892450p32904101.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging and HTTP Header question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 To whom it may concern, On 12/2/11 12:10 PM, jmpaul012 wrote: >> So I am doing Tomcat STIGS and I am stuck on two of the STIGs. >> >> 1. How do I change what tomcat logs? I think it's something I >> need to do in server.xml but I'm not sure. What have you tried so far? This is a community mailing list, not a consulting agency. We're here to help, not to do things for you. >> This is what I need to log: >> >> • Date, Time • IP address of the host that initiated the request >> • User ID supplied for HTTP authentication • HTTP Method • URL in >> the request • The protocol and protocol version used to make the >> request • Source and destination port numbers • Status codes for >> the response • Size of the response in bytes • HTTP Status and >> Referrer for the following events: That sounds a lot like an HTTP access log. Have you looked through the "logging" documentation for your version of Tomcat for how to do access logging? >> - Successful and unsuccessful attempts to access the web server >> software. Depends upon your definition of "successful", "attempt", and "access". >> - Successful and unsuccessful attempts to access the web site. Ditto. >> - Successful and unsuccessful attempts to access the web >> application. Ditto. >> 2. How do I view/change the HTTP header information of an >> intranet site that is using Tomcat? I have to make sure the HTTP >> header does not show information about the web server which would >> include, web server product, version, or host operating system Generally speaking, it's nice to post different questions in separate threads. It's not a huge deal, but it makes following a conversation easier for others. Anyhow, you are looking for changing the "Server" response header, right? That's in the documentation as well, but it might not be the easiest thing to find. See below. Since you are looking at securing Tomcat, you might want to have a look at the "Security Considerations" section of the Tomcat User Guide: http://tomcat.apache.org/tomcat-7.0-doc/security-howto.html (Make sure you use the right version -- I chose TC 7 because you never told us what you were running). Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7ZDaoACgkQ9CaO5/Lv0PB8QACgvfmekninLwMlIuafcwsG2WZ4 HnAAni9XbJ15C0/wv0RgiJuCaZavt/wQ =GVw2 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging and HTTP Header question
On Fri, 2011-12-02 at 09:10 -0800, jmpaul012 wrote: > can anyone help?? > > > jmpaul012 wrote: > > > > So I am doing Tomcat STIGS and I am stuck on two of the STIGs. > > > > 1. How do I change what tomcat logs? I think it's something I need to do > > in server.xml but I'm not sure. This is what I need to log: > > > > • Date, Time > > • IP address of the host that initiated the request > > • User ID supplied for HTTP authentication > > • HTTP Method > > • URL in the request > > • The protocol and protocol version used to make the request > > • Source and destination port numbers > > • Status codes for the response > > • Size of the response in bytes > > • HTTP Status and Referrer for the following events: > > > > - Successful and unsuccessful attempts to access the web server software. > > - Successful and unsuccessful attempts to access the web site. > > - Successful and unsuccessful attempts to access the web application. > > I believe this one was already answered. > In any case, your first stop should probably be the on-line > documentation for the AccessLog Valve. https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Log_Valve > > > > 2. How do I view/change the HTTP header information of an intranet site > > that is using Tomcat? I have to make sure the HTTP header does not show > > information about the web server which would include, web server product, > > version, or host operating system > > I think you want the "server" attribute of the element. https://tomcat.apache.org/tomcat-7.0-doc/config/http.html Dan
Re: Tomcat Logging and HTTP Header question
can anyone help?? jmpaul012 wrote: > > So I am doing Tomcat STIGS and I am stuck on two of the STIGs. > > 1. How do I change what tomcat logs? I think it's something I need to do > in server.xml but I'm not sure. This is what I need to log: > > • Date, Time > • IP address of the host that initiated the request > • User ID supplied for HTTP authentication > • HTTP Method > • URL in the request > • The protocol and protocol version used to make the request > • Source and destination port numbers > • Status codes for the response > • Size of the response in bytes > • HTTP Status and Referrer for the following events: > > - Successful and unsuccessful attempts to access the web server software. > - Successful and unsuccessful attempts to access the web site. > - Successful and unsuccessful attempts to access the web application. > > > 2. How do I view/change the HTTP header information of an intranet site > that is using Tomcat? I have to make sure the HTTP header does not show > information about the web server which would include, web server product, > version, or host operating system > -- View this message in context: http://old.nabble.com/Tomcat-Logging-and-HTTP-Header-question-tp32892450p32903676.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging and HTTP Header question
Sorry, the only acronym I really used was STIG, but I probably shouldn'tve included that in the question since it isn't really relavent to the question. STIGs are security proceduers the govt has to lock down their software, servers, etc. awarnier wrote: > > jmpaul012 wrote: >> So I am doing Tomcat STIGS and I am stuck on two of the STIGs. > > It would be nice to explain acronyms, so that nincompoops like me would > understand what's > going on without consulting Wikipedia.. > >> >> 1. How do I change what tomcat logs? I think it's something I need to >> do >> in server.xml but I'm not sure. This is what I need to log: >> >> • Date, Time >> • IP address of the host that initiated the request >> • User ID supplied for HTTP authentication >> • HTTP Method >> • URL in the request >> • The protocol and protocol version used to make the request >> • Source and destination port numbers >> • Status codes for the response >> • Size of the response in bytes >> • HTTP Status and Referrer for the following events: >> >> - Successful and unsuccessful attempts to access the web server software. >> - Successful and unsuccessful attempts to access the web site. >> - Successful and unsuccessful attempts to access the web application. >> > Logging successful attempts should be feasible, but I can see problems for > Tomcat logging > cases where the request doesn't even make it to Tomcat. > > In any case, your first stop should probably be the on-line documentation > for the > AccessLog Valve. > > > > --------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Tomcat-Logging-and-HTTP-Header-question-tp32892450p32896365.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging and HTTP Header question
jmpaul012 wrote: So I am doing Tomcat STIGS and I am stuck on two of the STIGs. It would be nice to explain acronyms, so that nincompoops like me would understand what's going on without consulting Wikipedia.. 1. How do I change what tomcat logs? I think it's something I need to do in server.xml but I'm not sure. This is what I need to log: • Date, Time • IP address of the host that initiated the request • User ID supplied for HTTP authentication • HTTP Method • URL in the request • The protocol and protocol version used to make the request • Source and destination port numbers • Status codes for the response • Size of the response in bytes • HTTP Status and Referrer for the following events: - Successful and unsuccessful attempts to access the web server software. - Successful and unsuccessful attempts to access the web site. - Successful and unsuccessful attempts to access the web application. Logging successful attempts should be feasible, but I can see problems for Tomcat logging cases where the request doesn't even make it to Tomcat. In any case, your first stop should probably be the on-line documentation for the AccessLog Valve. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Logging and HTTP Header question
So I am doing Tomcat STIGS and I am stuck on two of the STIGs. 1. How do I change what tomcat logs? I think it's something I need to do in server.xml but I'm not sure. This is what I need to log: • Date, Time • IP address of the host that initiated the request • User ID supplied for HTTP authentication • HTTP Method • URL in the request • The protocol and protocol version used to make the request • Source and destination port numbers • Status codes for the response • Size of the response in bytes • HTTP Status and Referrer for the following events: - Successful and unsuccessful attempts to access the web server software. - Successful and unsuccessful attempts to access the web site. - Successful and unsuccessful attempts to access the web application. 2. How do I view/change the HTTP header information of an intranet site that is using Tomcat? I have to make sure the HTTP header does not show information about the web server which would include, web server product, version, or host operating system -- View this message in context: http://old.nabble.com/Tomcat-Logging-and-HTTP-Header-question-tp32892450p32892450.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roshni, On 6/23/2011 4:49 AM, Roshni Basu wrote: > Do i need to make any changes in the logging.properties file? That's typically how logging is configured. > I tried making everything from FINE to WARNING and also i tried adding > org.apache.catalina.level=WARNING in the logging.properties, it somehow > worked. Did you read the documentation? The file itself is documented, somewhat, also. Remember that each logger can be configured differently. So, if you configure one logger to be level=WARN, other loggers may default to something else. > But Is this the way it should behave or we need to make changes in > my java code as well using that LogManager etc. Could you help me? I would do this at the configuration-file level. As Konstantin points out, webapps aren't allowed to change the logging configuration for the server. That would be a security problem, don't you think? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4DVIYACgkQ9CaO5/Lv0PDi2gCfbmaX2Y0yud3YXk16Y/db79Lr ZkQAn18f6dSmxGcMLM0YnZeUjcQRic+f =Ilci -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
Do i need to make any chnages in the logging.properties file? I tried making everything from FINE to WARNING and also i tried adding org.apache.catalina.level=WARNING in the logging.properties, it somehow worked. But Is this the way it should behave or we need to make changes in my java code as well using that LogManager etc. Could you help me? Konstantin Kolinko wrote: > > 2011/6/22 Roshni Basu : >> >> Tomcat version is 6.0.9. > > You know, 6.0.32 is out there... > http://tomcat.apache.org/security-6.html > >> Here is my snippet of code: >> >> LogManager logManager = LogManager.getLogManager(); >> Enumeration e = logManager.getLoggerNames(); > > It won't work, because the LogManager implementation used by Tomcat > (see docs for details) provides isolation for different webapps (class > loaders). > > You code will affect only single webapp, and will have zero effect on > anything else. > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Tomcat-Logging-level-change-tp31902405p31909658.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
So what exactly I can use to make it work in 6.0.9? Konstantin Kolinko wrote: > > 2011/6/22 Roshni Basu : >> >> Tomcat version is 6.0.9. > > You know, 6.0.32 is out there... > http://tomcat.apache.org/security-6.html > >> Here is my snippet of code: >> >> LogManager logManager = LogManager.getLogManager(); >> Enumeration e = logManager.getLoggerNames(); > > It won't work, because the LogManager implementation used by Tomcat > (see docs for details) provides isolation for different webapps (class > loaders). > > You code will affect only single webapp, and will have zero effect on > anything else. > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Tomcat-Logging-level-change-tp31902405p31908461.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
2011/6/22 Roshni Basu : > > Tomcat version is 6.0.9. You know, 6.0.32 is out there... http://tomcat.apache.org/security-6.html > Here is my snippet of code: > > LogManager logManager = LogManager.getLogManager(); > Enumeration e = logManager.getLoggerNames(); It won't work, because the LogManager implementation used by Tomcat (see docs for details) provides isolation for different webapps (class loaders). You code will affect only single webapp, and will have zero effect on anything else. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Logging level change
Its working fine when I set to "Fine". In catalina.out i can see "fine" and "info" logs butwhen I set to warning, even info level logs appear. n828cl wrote: > >> From: Roshni Basu [mailto:roshni...@gmail.com] >> Subject: Re: Tomcat Logging level change > >> I just run it when I need to change the log level. > > (This is like pulling teeth.) You're providing virtually no useful > information here. You run the program where? As a servlet? Standalone? > In some listener inside Tomcat? > > If you run it outside of Tomcat, why do you think it would have any effect > on what's going on inside Tomcat? > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Tomcat-Logging-level-change-tp31902405p31904743.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Logging level change
Application is running on tomcat. n828cl wrote: > >> From: Roshni Basu [mailto:roshni...@gmail.com] >> Subject: Re: Tomcat Logging level change > >> I just run it when I need to change the log level. > > (This is like pulling teeth.) You're providing virtually no useful > information here. You run the program where? As a servlet? Standalone? > In some listener inside Tomcat? > > If you run it outside of Tomcat, why do you think it would have any effect > on what's going on inside Tomcat? > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Tomcat-Logging-level-change-tp31902405p31904708.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Logging level change
> From: Roshni Basu [mailto:roshni...@gmail.com] > Subject: Re: Tomcat Logging level change > I just run it when I need to change the log level. (This is like pulling teeth.) You're providing virtually no useful information here. You run the program where? As a servlet? Standalone? In some listener inside Tomcat? If you run it outside of Tomcat, why do you think it would have any effect on what's going on inside Tomcat? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
Basically I have an web application running on tomcat. Mark Thomas wrote: > > On 22/06/2011 16:16, Roshni Basu wrote: >> >> I have created a java file. And running this. Could you elaborate what >> exactly you want to know? > > I want to know how this code is being executed. When does it run? What > triggers it? > > Mark > >> >> Mark Thomas wrote: >>> >>> On 22/06/2011 16:03, Roshni Basu wrote: >>>> >>>> Tomcat version is 6.0.9. >>>> Here is my snippet of code: >>>> >>>> LogManager logManager = LogManager.getLogManager(); >>>> Enumeration e = logManager.getLoggerNames(); >>>> while (e.hasMoreElements()) >>>> { >>>> String loggername = e.nextElement(); >>>> Logger logger = logManager.getLogger(loggername); >>>> Handler[] handlers = logger.getHandlers(); >>>> if (handlers != null && handlers.length != 0) >>>> { >>>> for (Handler h : handlers) >>>> { >>>> h.setLevel(Level.WARNING); >>>> } >>>> logger.setLevel(Level.WARNING); >>>> } >>>> } >>> >>> Which is running where exactly? >>> >>> Mark >>> >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >>> >>> >> > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Tomcat-Logging-level-change-tp31902405p31904384.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
I just run it when I need to change the log level. Mark Thomas wrote: > > On 22/06/2011 16:16, Roshni Basu wrote: >> >> I have created a java file. And running this. Could you elaborate what >> exactly you want to know? > > I want to know how this code is being executed. When does it run? What > triggers it? > > Mark > >> >> Mark Thomas wrote: >>> >>> On 22/06/2011 16:03, Roshni Basu wrote: >>>> >>>> Tomcat version is 6.0.9. >>>> Here is my snippet of code: >>>> >>>> LogManager logManager = LogManager.getLogManager(); >>>> Enumeration e = logManager.getLoggerNames(); >>>> while (e.hasMoreElements()) >>>> { >>>> String loggername = e.nextElement(); >>>> Logger logger = logManager.getLogger(loggername); >>>> Handler[] handlers = logger.getHandlers(); >>>> if (handlers != null && handlers.length != 0) >>>> { >>>> for (Handler h : handlers) >>>> { >>>> h.setLevel(Level.WARNING); >>>> } >>>> logger.setLevel(Level.WARNING); >>>> } >>>> } >>> >>> Which is running where exactly? >>> >>> Mark >>> >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >>> >>> >> > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Tomcat-Logging-level-change-tp31902405p31904220.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
On 22/06/2011 16:16, Roshni Basu wrote: > > I have created a java file. And running this. Could you elaborate what > exactly you want to know? I want to know how this code is being executed. When does it run? What triggers it? Mark > > Mark Thomas wrote: >> >> On 22/06/2011 16:03, Roshni Basu wrote: >>> >>> Tomcat version is 6.0.9. >>> Here is my snippet of code: >>> >>> LogManager logManager = LogManager.getLogManager(); >>> Enumeration e = logManager.getLoggerNames(); >>> while (e.hasMoreElements()) >>> { >>> String loggername = e.nextElement(); >>> Logger logger = logManager.getLogger(loggername); >>> Handler[] handlers = logger.getHandlers(); >>> if (handlers != null && handlers.length != 0) >>> { >>> for (Handler h : handlers) >>> { >>> h.setLevel(Level.WARNING); >>> } >>> logger.setLevel(Level.WARNING); >>> } >>> } >> >> Which is running where exactly? >> >> Mark >> >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
I have created a java file. And running this. Could you elaborate what exactly you want to know? Mark Thomas wrote: > > On 22/06/2011 16:03, Roshni Basu wrote: >> >> Tomcat version is 6.0.9. >> Here is my snippet of code: >> >> LogManager logManager = LogManager.getLogManager(); >> Enumeration e = logManager.getLoggerNames(); >> while (e.hasMoreElements()) >> { >> String loggername = e.nextElement(); >> Logger logger = logManager.getLogger(loggername); >> Handler[] handlers = logger.getHandlers(); >> if (handlers != null && handlers.length != 0) >> { >> for (Handler h : handlers) >> { >> h.setLevel(Level.WARNING); >> } >> logger.setLevel(Level.WARNING); >> } >> } > > Which is running where exactly? > > Mark > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Tomcat-Logging-level-change-tp31902405p31904108.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
On 22/06/2011 16:03, Roshni Basu wrote: > > Tomcat version is 6.0.9. > Here is my snippet of code: > > LogManager logManager = LogManager.getLogManager(); > Enumeration e = logManager.getLoggerNames(); > while (e.hasMoreElements()) > { > String loggername = e.nextElement(); > Logger logger = logManager.getLogger(loggername); > Handler[] handlers = logger.getHandlers(); > if (handlers != null && handlers.length != 0) > { > for (Handler h : handlers) > { > h.setLevel(Level.WARNING); > } > logger.setLevel(Level.WARNING); > } > } Which is running where exactly? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
Tomcat version is 6.0.9. Here is my snippet of code: LogManager logManager = LogManager.getLogManager(); Enumeration e = logManager.getLoggerNames(); while (e.hasMoreElements()) { String loggername = e.nextElement(); Logger logger = logManager.getLogger(loggername); Handler[] handlers = logger.getHandlers(); if (handlers != null && handlers.length != 0) { for (Handler h : handlers) { h.setLevel(Level.WARNING); } logger.setLevel(Level.WARNING); } } Konstantin Kolinko wrote: > > 2011/6/22 Roshni Basu : >> >> I am changing the log level of tomcat to Level.WARNING. In this case I'm >> trying to restart tomcat and see the logs, I can see the info level logs >> like "INFO: Server startup in 50516 ms" . >> I guess info level logs should not appear if log level set to warning. > > 1. If you did it correctly then yes, they should not appear. But what > exactly did you? Please be specific. > > 2. Exact Tomcat version, etc. > >> Kindly let me know how exactly it behvaes > > The sources are all available. > java.util.logging documentation is available from Oracle. > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Tomcat-Logging-level-change-tp31902405p31903978.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging level change
2011/6/22 Roshni Basu : > > I am changing the log level of tomcat to Level.WARNING. In this case I'm > trying to restart tomcat and see the logs, I can see the info level logs > like "INFO: Server startup in 50516 ms" . > I guess info level logs should not appear if log level set to warning. 1. If you did it correctly then yes, they should not appear. But what exactly did you? Please be specific. 2. Exact Tomcat version, etc. > Kindly let me know how exactly it behvaes The sources are all available. java.util.logging documentation is available from Oracle. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Logging level change
Hi, I am changing the log level of tomcat to Level.WARNING. In this case I'm trying to restart tomcat and see the logs, I can see the info level logs like "INFO: Server startup in 50516 ms" . I guess info level logs should not appear if log level set to warning. Kindly let me know how exactly it behvaes and why am i getting info level logs? -- View this message in context: http://old.nabble.com/Tomcat-Logging-level-change-tp31902405p31902405.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Switching native Tomcat logging system
- Original Message - > From: Francis GALIEGUE > To: Tomcat Users List > Cc: > Sent: Tuesday, May 31, 2011 11:49 AM > Subject: Switching native Tomcat logging system > > Hello, > > For some obscure reasons, Tomcat insists on having its own "native" > implementation of a logging system, namely juli. > > This is beyond my understanding. Log4j has existed for years, is much > better than even the native Sun's JDK logging API of today, and Tomcat > hasn't switched to it, even to the expense of requiring, or even > bundling (licenses are not incompatible after all) it with its > distributions. WHY? > > And today, there is slf4j, which is even better. Especially combined > with logback. I don't even want to HEAR about the JDK's logging API, > it is miserable. > > When will Tomcat's logging account at last for 21st century logging > systems? I am surprised log4j didn't even become the default for > 6.0.x, and 7.0.x still doesn't make it the default... > > -- > Francis Galiegue > ONE2TEAM > Ingénieur système > Mob : +33 (0) 683 877 875 > Tel : +33 (0) 178 945 552 > f...@one2team.com > 40 avenue Raymond Poincaré > 75116 Paris Hmm: http://tomcat.apache.org/tomcat-6.0-doc/logging.html http://tomcat.apache.org/tomcat-7.0-doc/logging.html For SLF4J (via a quick Google search): http://code.google.com/p/tomcat-slf4j/ http://jbrisbin.wordpress.com/2010/04/20/change-logging-package-to-slf4jlog4j-in-tcservertomcat/ I've not used SLF4J, so I have no comments on the above. And here's a logback-slf4j-tomcat implementation: https://github.com/grgrzybek/tomcat-slf4j-logback I've not done the above, so I have no comments. I've not tried anything other than the standard Juli logging for Tomcat. I might investigate the log4j mechanism (seems least invasive) and then use the syslog appender for centralized logging. . . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Switching native Tomcat logging system
On 31/05/2011 19:49, Francis GALIEGUE wrote: > Hello, > > For some obscure reasons, Tomcat insists on having its own "native" > implementation of a logging system, namely juli. > > This is beyond my understanding. Log4j has existed for years, is much > better than even the native Sun's JDK logging API of today, and Tomcat > hasn't switched to it, even to the expense of requiring, or even > bundling (licenses are not incompatible after all) it with its > distributions. WHY? > > And today, there is slf4j, which is even better. Especially combined > with logback. I don't even want to HEAR about the JDK's logging API, > it is miserable. > > When will Tomcat's logging account at last for 21st century logging > systems? I am surprised log4j didn't even become the default for > 6.0.x, and 7.0.x still doesn't make it the default... > Yawn. Have you read the docs? http://tomcat.apache.org/tomcat-6.0-doc/logging.html p signature.asc Description: OpenPGP digital signature
Switching native Tomcat logging system
Hello, For some obscure reasons, Tomcat insists on having its own "native" implementation of a logging system, namely juli. This is beyond my understanding. Log4j has existed for years, is much better than even the native Sun's JDK logging API of today, and Tomcat hasn't switched to it, even to the expense of requiring, or even bundling (licenses are not incompatible after all) it with its distributions. WHY? And today, there is slf4j, which is even better. Especially combined with logback. I don't even want to HEAR about the JDK's logging API, it is miserable. When will Tomcat's logging account at last for 21st century logging systems? I am surprised log4j didn't even become the default for 6.0.x, and 7.0.x still doesn't make it the default... -- Francis Galiegue ONE2TEAM Ingénieur système Mob : +33 (0) 683 877 875 Tel : +33 (0) 178 945 552 f...@one2team.com 40 avenue Raymond Poincaré 75116 Paris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat logging changed between 6.0.29 & 6.0.32
On Apr 2, 2011, at 6:53 PM, Konstantin Kolinko wrote: 2011/4/3 Patrick Flaherty : Also of note, I see the stderr log with a *lot of the messages* that are in the Catalina log. Exact duplicate line entries. That is expected. Remove "java.util.logging.ConsoleHandler" from configuration. A "1catalina.org.apache.juli.FileHandler" there is enough. Yes, That worked. There is a new log in 6.0.32 called commons-daemon.2011-04-01.log also the stderr & stdout have different names between the two builds. 6.0.29 names stdout_20110402.log stderr_20110402.log 6.0.32 names tomcat6-stderr.2011-04-02.log tomcat6-stdout.2011-04-02.log Yes, that is. It is just cosmetic changes though. From using a different version of http://commons.apache.org/daemon/ Thanks for the explanation. What I see that's was never seen in any Tomcat logs is what looks like messaging from a 3rd party dll. but I also see messages that are not in my code which *ARE* the new messages seen now in stdout from the 3rd party library. DLLs in Java? Anyway, cannot say much from what you have wrote. Neither you mention the actual messages. This is the startup/beginning of my tomcat6-stdout: 2011-04-02 16:51:16 Commons Daemon procrun stdout initializedfound condition with property "CSFONT_Group::CSFONT_isEmbedded" PRC MANIP: Changed severity for Rule "Missing Fonts" in RuleSet "Automatic Rule Set" found condition with property "CSFONT_Group::CSFONT_BaseFontName" PRC MANIP: Changed severity for Rule "Missing Fonts" in RuleSet "Automatic Rule Set" found condition with property "CSIMAGE_Group::CSIMAGE_Resolution" found condition with property "CSIMAGE_Group::CSIMAGE_Resolution" found condition with property "CSIMAGE_Group::CSIMAGE_Resolution" found condition with property "CSIMAGE_Group::CSIMAGE_Resolution" These messages *do* show in the console when I run tomcat6.exe but historically never in any log. Also my System.out.println messages *do not show* up in any log where they printed in stdout in 6.0.29.? The OS is Windows 7 64 Bit. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat logging changed between 6.0.29 & 6.0.32
2011/4/3 Patrick Flaherty : > Also of note, I see the stderr log with a *lot of the messages* that are in > the Catalina log. > Exact duplicate line entries. That is expected. Remove "java.util.logging.ConsoleHandler" from configuration. A "1catalina.org.apache.juli.FileHandler" there is enough. > There is a new log in 6.0.32 called > commons-daemon.2011-04-01.log also the stderr & stdout have different names > between the two builds. > > 6.0.29 names > stdout_20110402.log > stderr_20110402.log > > 6.0.32 names > tomcat6-stderr.2011-04-02.log > tomcat6-stdout.2011-04-02.log Yes, that is. It is just cosmetic changes though. From using a different version of http://commons.apache.org/daemon/ > What I see that's was never seen in any Tomcat logs is what looks like > messaging from a 3rd party dll. > but I also see messages that are not in my code which *ARE* the new messages > seen > now in stdout from the 3rd party library. DLLs in Java? Anyway, cannot say much from what you have wrote. Neither you mention the actual messages. > The OS is Windows 7 64 Bit. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat logging changed between 6.0.29 & 6.0.32
There are definitely changes. What used to show up was anything I printed from my app via System.out.println. I don't see any of those messages in any of the logs. What I see that's was never seen in any Tomcat logs is what looks like messaging from a 3rd party dll. If I run the console via tomcat6.exe I do see the messages I print via System.out.println but I also see messages that are not in my code which *ARE* the new messages seen now in stdout from the 3rd party library. Also of note, I see the stderr log with a *lot of the messages* that are in the Catalina log. Exact duplicate line entries. Finally I went back to 6.0.29 and noted this. There is a new log in 6.0.32 called commons-daemon.2011-04-01.log also the stderr & stdout have different names between the two builds. 6.0.29 names stdout_20110402.log stderr_20110402.log 6.0.32 names tomcat6-stderr.2011-04-02.log tomcat6-stdout.2011-04-02.log The OS is Windows 7 64 Bit. Thanks Pat On Apr 2, 2011, at 3:40 PM, Konstantin Kolinko wrote: 2011/4/2 Patrick Flaherty : Hello, I noticed that I'm getting what appears to be *all* console logging showing up in my tomcat6-stdout log file. It's capturing so much more that then it used to. I looked at the changelog from 6.0.29 to 6.0.32 and I don't see anything that describes such a change. Does anyone know what exactly did change and if there is a way to go back to previous behavior. I tried playing around with the logging.properties in /conf and changed everything from FINE to SEVERE to see if I could control the amount of info ending up in tomcat6- stdout. Did not seem to change anything. Any explanation and/or direction would be much appreciated. There should not be any such changes. What, exactly, is printed? What is your OS? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Patrick Flaherty Rampage Systems Inc. 411 Waverley Oaks Rd. Suite 138 Waltham, MA. 02452-8405 781-891-9400 x239 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat logging changed between 6.0.29 & 6.0.32
2011/4/2 Patrick Flaherty : > Hello, > > I noticed that I'm getting what appears to be *all* console logging showing > up in my tomcat6-stdout log file. > It's capturing so much more that then it used to. I looked at the changelog > from 6.0.29 to 6.0.32 and I don't > see anything that describes such a change. > > Does anyone know what exactly did change and if there is a way to go back to > previous behavior. > > I tried playing around with the logging.properties in /conf and changed > everything from FINE to SEVERE > to see if I could control the amount of info ending up in tomcat6-stdout. > Did not seem to change anything. > > Any explanation and/or direction would be much appreciated. > There should not be any such changes. What, exactly, is printed? What is your OS? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat logging changed between 6.0.29 & 6.0.32
Hello, I noticed that I'm getting what appears to be *all* console logging showing up in my tomcat6-stdout log file. It's capturing so much more that then it used to. I looked at the changelog from 6.0.29 to 6.0.32 and I don't see anything that describes such a change. Does anyone know what exactly did change and if there is a way to go back to previous behavior. I tried playing around with the logging.properties in /conf and changed everything from FINE to SEVERE to see if I could control the amount of info ending up in tomcat6- stdout. Did not seem to change anything. Any explanation and/or direction would be much appreciated. Thanks Pat - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Not Working Properly
On 24.09.2010 16:05, Donald Winston wrote: I can't get logging to work properly with tomcat(. The file handler prefix works but anything below INFO does not show up in the log! What could be wrong? I declare the logger in my classes like the following: private static Logger logger = Logger.getLogger(JessServletCommand.class.getName()); My logging.properties file is in my WEB-INF/classes directory. It is the following: handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler # Handler specific properties. # Describes specific configuration info for Handlers. org.apache.juli.FileHandler.level = FINE org.apache.juli.FileHandler.directory = ${catalina.base}/logs org.apache.juli.FileHandler.prefix = test. java.util.logging.ConsoleHandler.level = FINE java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter This part only configure the handlers. You need to set the level and the loggers as well, so that the loggers actually produce the messages. The level on the handlers is only kind of additional filter the be able to e.g. write different amounts to console and file. Examples for configuring loggers are contained in the default conf/logging.properties shipped with Tomcat: Examples: my.package.level = FINE my.otherpackage.SomeClass.level=FINEST my.badpackage.SomeNoisyClass.level=ERROR Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Not Working Properly
On 25/09/2010 02:51, Donald Winston wrote: > resurrection.level=FINE > (thanks everybody. You were helpful) You should ask for your money back. p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: Tomcat Logging Not Working Properly
On Sat, Sep 25, 2010 at 3:51 AM, Donald Winston wrote: > resurrection.level=FINE > (thanks everybody. You were helpful) > Hey If I don't know I don't answer. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Not Working Properly
resurrection.level=FINE (thanks everybody. You were helpful) On Sep 24, 2010, at 10:05 AM, Donald Winston wrote: > > I can't get logging to work properly with tomcat(. The file handler prefix > works but anything below INFO does not show up in the log! What could be > wrong? I declare the logger in my classes like the following: > private static Logger logger = > Logger.getLogger(JessServletCommand.class.getName()); > > My logging.properties file is in my WEB-INF/classes directory. It is the > following: > > handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler > > > # Handler specific properties. > # Describes specific configuration info for Handlers. > > > org.apache.juli.FileHandler.level = FINE > org.apache.juli.FileHandler.directory = ${catalina.base}/logs > org.apache.juli.FileHandler.prefix = test. > > java.util.logging.ConsoleHandler.level = FINE > java.util.logging.ConsoleHandler.formatter = > java.util.logging.SimpleFormatter > > Donald Paul Winston satchwins...@yahoo.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Logging Not Working Properly
I can't get logging to work properly with tomcat(. The file handler prefix works but anything below INFO does not show up in the log! What could be wrong? I declare the logger in my classes like the following: private static Logger logger = Logger.getLogger(JessServletCommand.class.getName()); My logging.properties file is in my WEB-INF/classes directory. It is the following: handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler # Handler specific properties. # Describes specific configuration info for Handlers. org.apache.juli.FileHandler.level = FINE org.apache.juli.FileHandler.directory = ${catalina.base}/logs org.apache.juli.FileHandler.prefix = test. java.util.logging.ConsoleHandler.level = FINE java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
tomcat logging error
Hi , When i run a hibernate application in tomcat 5.5.28,i am getting the following error SEVERE: An exception or error occurred in the container during the request processing java.lang.UnsupportedOperationException: The logger [org.slf4j.impl.SimpleLogger(org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/agsc].[jsp])] does not seem to be location aware. at org.apache.log4j.Category.log(Category.java:278) at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:253) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) Please help. -- View this message in context: http://old.nabble.com/tomcat-logging-error-tp27000315p27000315.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
reconfiguring tomcat logging
Whenever tomat compiles a JSP page and there is an error in it (for instance trying to reference a property on a bean that doesn't exist), it is throwing (and obscuring) an exception and logging it to catalina.out and then returning whatever html it has built to the browser, as in : Sep 2, 2009 2:07:28 PM org.apache.catalina.core.ApplicationDispatcher invokeSEVERE: Servlet.service() for servlet jsp threw exception javax.el.PropertyNotFoundException: Property 'blah' not found on com.foo.bar (and then a ginormous stack trace) This would be good if I knew which host actually had this error. I have one tomcat instance server with a number of hosts, each a sandbox for a developer. Is there any way to configure the logging per host such that these errors that get logged to catalina.out get logged to a host specific log file instead of catalina.out (or as well as)? I am looking at the document at http://tomcat.apache.org/tomcat-6.0-doc/logging.html, but I just don't see/understand what I need to do. This is not to be confused with logging generated from within my context - I have that configured via logback going to its own log file successfully - it's the tomcat engine errors that I need to deal with. Or, if this isn't possible, is there a way to configure tomcat to generate that stack trace about the PropertyNotFoundException as the output html when it tries to compile the JSP instead of obscuring it and returning a partially complete html page? Thanks Chris Tomcat 6.0.20 CentOS 4 Java(TM) SE Runtime Environment (build 1.6.0_16-b01) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Logging Wrong time in tomcat logs
Hi - I am having the same problem. Did you figure it out? Mon Cab wrote: > > Good day > > I am not sure why but tomcat seems to have started logging the > incorrect time in logs. My server is on PDT, and tomcat is logging 8 > hours ahead in the logs (GMT). > > Eg when it is 2008-01-28 20:53 tomcat is logging > > 2008-01-29 04:53:07,199 > > Any insight into why tomcat is doing this, and / or how I can change > this would be appreciated. Is this normal? > > > > > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Tomcat-Logging-Wrong-time-in-tomcat-logs-tp15152476p20393595.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to enable embedded tomcat logging - stderr.log & stdout.log ?
Hi, We are using embedded tomcat (5.0.28) in our project. Now the requirement is to enable tomcat level logging mainly into stderr.log & stdout.log. Current code updates: // 1. tried settting logging at server level embedded = new Embedded(); // print all log statments to standard error embedded.setDebug(0); embedded.setLogger(new SystemOutLogger()); //2. even tried doing this file logging but logs are not coming FileLogger fileLog = new FileLogger(); fileLog.setDirectory("c:\\"); fileLog.setVerbosity(4); fileLog.setPrefix("EmbeddedTomcat5028"); fileLog.setSuffix(".log"); fileLog.setTimestamp(true); //fileLog.start(); // embedded.setLogger(fileLog); //2. tried settting logging at engine level // Create an engine engine = embedded.createEngine(); engine.setDefaultHost("localhost"); engine.setLogger(fileLog); In all the cases, logging is not coming up in /logs folder. Can someone share what are the right steps for this? regards, Raminder Singh CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS***
Re: Tomcat Logging and URL rewrite
Mohit Anchlia wrote: > That's just for the logging from my application. You'll need to set the log level for your application loggers as well. org.apache.catalina.core.ContainerBase.[Catalina].[localhost] is the logger that catches any exceptions etc that your application doesn't. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Logging and URL rewrite
That's just for the logging from my application. On Tue, Sep 30, 2008 at 8:57 AM, Mark Thomas <[EMAIL PROTECTED]> wrote: > Mohit Anchlia wrote: >> Tomcat version is 5.5 and I changed > That helps a little, but there are 28 different Tomcat 5.5 versions. > http://tomcat.apache.org/tomcat-5.5-doc/logging.html should help > >> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level to >> ALL > That won't show you any internal Tomcat logging. > > Mark > > >> >> On Tue, Sep 30, 2008 at 1:52 AM, Mark Thomas <[EMAIL PROTECTED]> wrote: >>> Mohit Anchlia wrote: >>>> Is it possible to rewrite URL in tomcat like apache web server. I need >>>> to convert abc.com/A to abc.com/B. >>> http://tuckey.org/urlrewrite/ >>> >>>> Also catalina.out is just writing infomation at level INFO. I changed >>>> the level to ALL in logging.properties but still I don't see DEBUG >>>> logs. Is there a way to debug this problem? >>> Tomcat version? Exactly what did you change? >>> >>> http://tomcat.apache.org/tomcat-6.0-doc/logging.html should tell you >>> everything you need to know. >>> >>> Mark >>> >>> >>> >>> - >>> To start a new topic, e-mail: users@tomcat.apache.org >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Logging and URL rewrite
Mohit Anchlia wrote: > Tomcat version is 5.5 and I changed That helps a little, but there are 28 different Tomcat 5.5 versions. http://tomcat.apache.org/tomcat-5.5-doc/logging.html should help > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level to > ALL That won't show you any internal Tomcat logging. Mark > > On Tue, Sep 30, 2008 at 1:52 AM, Mark Thomas <[EMAIL PROTECTED]> wrote: >> Mohit Anchlia wrote: >>> Is it possible to rewrite URL in tomcat like apache web server. I need >>> to convert abc.com/A to abc.com/B. >> http://tuckey.org/urlrewrite/ >> >>> Also catalina.out is just writing infomation at level INFO. I changed >>> the level to ALL in logging.properties but still I don't see DEBUG >>> logs. Is there a way to debug this problem? >> Tomcat version? Exactly what did you change? >> >> http://tomcat.apache.org/tomcat-6.0-doc/logging.html should tell you >> everything you need to know. >> >> Mark >> >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Logging and URL rewrite
Tomcat version is 5.5 and I changed org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level to ALL On Tue, Sep 30, 2008 at 1:52 AM, Mark Thomas <[EMAIL PROTECTED]> wrote: > Mohit Anchlia wrote: >> Is it possible to rewrite URL in tomcat like apache web server. I need >> to convert abc.com/A to abc.com/B. > > http://tuckey.org/urlrewrite/ > >> Also catalina.out is just writing infomation at level INFO. I changed >> the level to ALL in logging.properties but still I don't see DEBUG >> logs. Is there a way to debug this problem? > > Tomcat version? Exactly what did you change? > > http://tomcat.apache.org/tomcat-6.0-doc/logging.html should tell you > everything you need to know. > > Mark > > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Logging and URL rewrite
Mohit Anchlia wrote: > Is it possible to rewrite URL in tomcat like apache web server. I need > to convert abc.com/A to abc.com/B. http://tuckey.org/urlrewrite/ > Also catalina.out is just writing infomation at level INFO. I changed > the level to ALL in logging.properties but still I don't see DEBUG > logs. Is there a way to debug this problem? Tomcat version? Exactly what did you change? http://tomcat.apache.org/tomcat-6.0-doc/logging.html should tell you everything you need to know. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Logging and URL rewrite
Is it possible to rewrite URL in tomcat like apache web server. I need to convert abc.com/A to abc.com/B. Also catalina.out is just writing infomation at level INFO. I changed the level to ALL in logging.properties but still I don't see DEBUG logs. Is there a way to debug this problem? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat logging properties
> From: Brian Clark [mailto:[EMAIL PROTECTED] > Subject: Re: Tomcat logging properties > > Yep, read through that, but it didn't tell me what those > directives actually mean. Anyone have anything else? They specify logging levels for those specific classes, overriding any more generic settings. The FAQ has some good information with links to more detailed docs: http://wiki.apache.org/tomcat/FAQ/Logging - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat logging properties
These are examples for changing the logging level on a sample of Tomcat internal components (which generally use the class name as the category). Not really useful unless you're trying to track down a bug in Tomcat itself. "Brian Clark" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Yep, read through that, but it didn't tell me what those directives > actually mean. Anyone have anything else? > > > > - Original Message > From: Yassine <[EMAIL PROTECTED]> > To: Tomcat Users List > Sent: Wednesday, September 10, 2008 8:17:01 PM > Subject: Re: Tomcat logging properties > > have a look here if you still need more info > http://tomcat.apache.org/tomcat-6.0-doc/logging.html > > > On Thu, Sep 11, 2008 at 2:10 AM, Brian Clark <[EMAIL PROTECTED]> > wrote: >> At the bottom of my Tomcat 6.0.16 logging.properties file, I have the >> following entries: >> #org.apache.catalina.startup.ContextConfig.level = FINE >> #org.apache.catalina.startup.HostConfig.level = FINE >> #org.apache.catalina.session.ManagerBase.level = FINE >> #org.apache.catalina.core.AprLifecycleListener.level=FINE >> >> Aside from being commented out at the moment, I don't really know what >> these do. I couldn't find any documentation on them. Can someone point me >> to something that explains what these things might log? I'm struggling >> with an application issue, and my current logs and logging levels aren't >> showing me much. >> >> Thanks, >> Brian >> >> >> >> > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat logging properties
Yep, read through that, but it didn't tell me what those directives actually mean. Anyone have anything else? - Original Message From: Yassine <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Wednesday, September 10, 2008 8:17:01 PM Subject: Re: Tomcat logging properties have a look here if you still need more info http://tomcat.apache.org/tomcat-6.0-doc/logging.html On Thu, Sep 11, 2008 at 2:10 AM, Brian Clark <[EMAIL PROTECTED]> wrote: > At the bottom of my Tomcat 6.0.16 logging.properties file, I have the > following entries: > #org.apache.catalina.startup.ContextConfig.level = FINE > #org.apache.catalina.startup.HostConfig.level = FINE > #org.apache.catalina.session.ManagerBase.level = FINE > #org.apache.catalina.core.AprLifecycleListener.level=FINE > > Aside from being commented out at the moment, I don't really know what these > do. I couldn't find any documentation on them. Can someone point me to > something that explains what these things might log? I'm struggling with an > application issue, and my current logs and logging levels aren't showing me > much. > > Thanks, > Brian > > > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat logging properties
have a look here if you still need more info http://tomcat.apache.org/tomcat-6.0-doc/logging.html On Thu, Sep 11, 2008 at 2:10 AM, Brian Clark <[EMAIL PROTECTED]> wrote: > At the bottom of my Tomcat 6.0.16 logging.properties file, I have the > following entries: > #org.apache.catalina.startup.ContextConfig.level = FINE > #org.apache.catalina.startup.HostConfig.level = FINE > #org.apache.catalina.session.ManagerBase.level = FINE > #org.apache.catalina.core.AprLifecycleListener.level=FINE > > Aside from being commented out at the moment, I don't really know what these > do. I couldn't find any documentation on them. Can someone point me to > something that explains what these things might log? I'm struggling with an > application issue, and my current logs and logging levels aren't showing me > much. > > Thanks, > Brian > > > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat logging properties
At the bottom of my Tomcat 6.0.16 logging.properties file, I have the following entries: #org.apache.catalina.startup.ContextConfig.level = FINE #org.apache.catalina.startup.HostConfig.level = FINE #org.apache.catalina.session.ManagerBase.level = FINE #org.apache.catalina.core.AprLifecycleListener.level=FINE Aside from being commented out at the moment, I don't really know what these do. I couldn't find any documentation on them. Can someone point me to something that explains what these things might log? I'm struggling with an application issue, and my current logs and logging levels aren't showing me much. Thanks, Brian
Set Tomcat logging timezone - switching summer time (daylight saving) automatically
I found that if you add -Duser.timezone=Europe/London into JAVA_OPTS in catalina.sh, all tomcat logging will use BST at summer time, but -Duser.timezone=BST does NOT work. Hope this is useful for somebody. Albert Yu (Yizhuan Yu) __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Logging Wrong time in tomcat logs
Note This problem does not seem to ba due to the JVM having an incorrect value for the timezone. I ran the following code : import java.util.Date; import java.util.TimeZone; public class TimeTest { public static void main(String args[]) { long time = System.currentTimeMillis(); String millis = Long.toString(time); Date date = new Date(time); System.out.println("Current time in milliseconds = " + millis + " => " + date.toString()); System.out.println("Current time zone: " + TimeZone.getDefault().getID()); System.out.println("TimeZone.getDefault: "+TimeZone.getDefault()); } } And got the correct timezone back when I called the class using java. Current time in milliseconds = 1201587209213 => Mon Jan 28 22:13:29 PST 2008 Current time zone: America/Los_Angeles TimeZone.getDefault: sun.util.calendar.ZoneInfo[id="America/Los_Angeles",offset= -2880,dstSavings=360,useDaylight=true,transitions=185,lastRule=java.util .SimpleTimeZone[id=America/Los_Angeles,offset=-2880,dstSavings=360,useDa ylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,sta rtTime=720,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,end Time=720,endTimeMode=0]] --- Mon Cab <[EMAIL PROTECTED]> wrote: > Good day > > I am not sure why but tomcat seems to have started logging the > incorrect time in logs. My server is on PDT, and tomcat is logging 8 > hours ahead in the logs (GMT). > > Eg when it is 2008-01-28 20:53 tomcat is logging > > 2008-01-29 04:53:07,199 > > Any insight into why tomcat is doing this, and / or how I can change > this would be appreciated. Is this normal? > > > > > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Logging Wrong time in tomcat logs
Good day I am not sure why but tomcat seems to have started logging the incorrect time in logs. My server is on PDT, and tomcat is logging 8 hours ahead in the logs (GMT). Eg when it is 2008-01-28 20:53 tomcat is logging 2008-01-29 04:53:07,199 Any insight into why tomcat is doing this, and / or how I can change this would be appreciated. Is this normal? Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Logging Configuration
Ole Ersoy a écrit : Hi, I'm trying to point the catalina handler to /var/log/apache-tomcat like by configuring the logging.properties file like this: 1catalina.org.apache.juli.FileHandler.level = FINE 1catalina.org.apache.juli.FileHandler.directory = /var/log/apache-tomcat/ 1catalina.org.apache.juli.FileHandler.prefix = catalina. These lines will create a file named catalina.2007.log However when I start Tomcat I get this message: [EMAIL PROTECTED] apache-tomcat]# service tomcat start Starting tomcat Unable to redirect to /usr/share/apache-tomcat/logs/catalina.out catalina.out is managed by catalina.sh Any ideas on how to fix this? This error does not come from logging.properties. Lionel Thanks, - Ole - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Logging Configuration
Hi, I'm trying to point the catalina handler to /var/log/apache-tomcat like by configuring the logging.properties file like this: 1catalina.org.apache.juli.FileHandler.level = FINE 1catalina.org.apache.juli.FileHandler.directory = /var/log/apache-tomcat/ 1catalina.org.apache.juli.FileHandler.prefix = catalina. However when I start Tomcat I get this message: [EMAIL PROTECTED] apache-tomcat]# service tomcat start Starting tomcat Unable to redirect to /usr/share/apache-tomcat/logs/catalina.out Any ideas on how to fix this? Thanks, - Ole - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Precompiling JSP pages getting "cannot be found: org/apache/tomcat/logging/Logger" error
Did you search on Google for answers? Add commons-logging.jar to the lib folder and make sure it is in the classpath of your build file. -Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Precompiling JSP pages getting "cannot be found: org/apache/tomcat/logging/Logger" error
Hello Pre compiling the JSP pages we get following error "A class needed by class org.apache.jasper.JspC cannot be found: org/apache/tomcat/logging/Logger" Which tomcat jar has this class defined? Any help? -Venky
Re: Tomcat logging problem
Hi, Rick thank you for your suggestions.I removed all my log files and restarted tomcat againg but faced the same problems. I also checked and saw that tomcat was running under user tomcat and not root. Also I do not use the restart argument for my script. Whenever I work use stop and start arguments. The script was only used so that I can start tomcat up at boot time. How can i modify the properties of the logger so that files either start under tomcat or have write privileges for tomcat. Thank You Tejas On 10/3/06, Rick Fisk <[EMAIL PROTECTED]> wrote: I tried your script both ways and it worked flawlessly on a CentOS 3.6 box. I would take a look under which user the jvm is running after you start your script. (ps -ef | grep java) If it is running as root then that might indicate that something about the su command isn't working as expected. It also might be that you once ran the jvm as root and it isn't your startup script at all but the fact that the log files were once created with root ownership. Thus, subsequent tomcat invocations fail to write to existing logs due to invalid permissions. Have you tried removing the logs and running your startup script again? Also, in my experience it would be better to add more checking to see that the java vm has truly stopped in the restart logic. Java has to unload everything at stop time and 10 seconds is not always enough. The default shutdown.sh script will exit with a normal return code even if the jvm is still running. So, a good number of times, the listening ports will still be in use when the start command is executed throwing lots of nasty exceptions. You could modify startup.sh so that it doesn't exit until the jvm is stopped, or modify your 'sleep' statement such that it has process checking logic that waits for some period of time for the jvm to exit and if it fails kill it. The latter is more desirable since you will probably upgrade tomcat at some point and do not want to risk losing your changes or having to adapt them as the startup and shutdown scripts change over time. -Original Message- From: Tejas Dhedia [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 6:00 PM To: users@tomcat.apache.org Subject: Tomcat logging problem Hi, I am running tomcat 5.5.17 under opensuse 10.1 and my JVM version is 1.5.0_06. I am running my tomcat as a seperate tomcat user and starting it at boot time using the following script in /etc/init.d. #!/bin/sh # # Startup script for Tomcat JAVA_HOME=/usr/lib/jvm/java export JAVA_HOME start_tomcat=/home/tomcat/apache-tomcat-5.5.17/bin/startup.sh stop_tomcat=/home/tomcat/apache-tomcat-5.5.17/bin/shutdown.sh start() { echo -n "Starting tomcat: " su -c ${start_tomcat} - tomcat echo "done." } stop() { echo -n "Shutting down tomcat: " ${stop_tomcat} echo "done." } # See how we were called case "$1" in start) start ;; stop) stop ;; restart) stop sleep 10 start ;; *) echo "Usage: $0 {start|stop|restart}" esac I get following error output in my catalina.out file java.util.logging.ErrorManager: 4 java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17 /logs/localhost.2006-10-02.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.(FileOutputStream.java:177) at java.io.FileOutputStream.(FileOutputStream.java:102) at java.io.FileWriter.(FileWriter.java:61) at org.apache.juli.FileHandler.open(FileHandler.java:256) at org.apache.juli.FileHandler.(FileHandler.java:50) java.util.logging.ErrorManager: 4 java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17 /logs/admin.2006-10-02.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) . java.util.logging.ErrorManager: 4 java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17/logs/host- manager.2006-10-02.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) As a result nothing is being logged. On checking I found that the log files were being created with owner as root instead of tomcat. Can someone please help me find where am i going wrong. Thanks Tejas - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat logging problem
I tried your script both ways and it worked flawlessly on a CentOS 3.6 box. I would take a look under which user the jvm is running after you start your script. (ps -ef | grep java) If it is running as root then that might indicate that something about the su command isn't working as expected. It also might be that you once ran the jvm as root and it isn't your startup script at all but the fact that the log files were once created with root ownership. Thus, subsequent tomcat invocations fail to write to existing logs due to invalid permissions. Have you tried removing the logs and running your startup script again? Also, in my experience it would be better to add more checking to see that the java vm has truly stopped in the restart logic. Java has to unload everything at stop time and 10 seconds is not always enough. The default shutdown.sh script will exit with a normal return code even if the jvm is still running. So, a good number of times, the listening ports will still be in use when the start command is executed throwing lots of nasty exceptions. You could modify startup.sh so that it doesn't exit until the jvm is stopped, or modify your 'sleep' statement such that it has process checking logic that waits for some period of time for the jvm to exit and if it fails kill it. The latter is more desirable since you will probably upgrade tomcat at some point and do not want to risk losing your changes or having to adapt them as the startup and shutdown scripts change over time. -Original Message- From: Tejas Dhedia [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 6:00 PM To: users@tomcat.apache.org Subject: Tomcat logging problem Hi, I am running tomcat 5.5.17 under opensuse 10.1 and my JVM version is 1.5.0_06. I am running my tomcat as a seperate tomcat user and starting it at boot time using the following script in /etc/init.d. #!/bin/sh # # Startup script for Tomcat JAVA_HOME=/usr/lib/jvm/java export JAVA_HOME start_tomcat=/home/tomcat/apache-tomcat-5.5.17/bin/startup.sh stop_tomcat=/home/tomcat/apache-tomcat-5.5.17/bin/shutdown.sh start() { echo -n "Starting tomcat: " su -c ${start_tomcat} - tomcat echo "done." } stop() { echo -n "Shutting down tomcat: " ${stop_tomcat} echo "done." } # See how we were called case "$1" in start) start ;; stop) stop ;; restart) stop sleep 10 start ;; *) echo "Usage: $0 {start|stop|restart}" esac I get following error output in my catalina.out file java.util.logging.ErrorManager: 4 java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17 /logs/localhost.2006-10-02.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.(FileOutputStream.java:177) at java.io.FileOutputStream.(FileOutputStream.java:102) at java.io.FileWriter.(FileWriter.java:61) at org.apache.juli.FileHandler.open(FileHandler.java:256) at org.apache.juli.FileHandler.(FileHandler.java:50) java.util.logging.ErrorManager: 4 java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17 /logs/admin.2006-10-02.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) . java.util.logging.ErrorManager: 4 java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17/logs/host- manager.2006-10-02.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) As a result nothing is being logged. On checking I found that the log files were being created with owner as root instead of tomcat. Can someone please help me find where am i going wrong. Thanks Tejas - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat logging problem
Hi, I am running tomcat 5.5.17 under opensuse 10.1 and my JVM version is 1.5.0_06. I am running my tomcat as a seperate tomcat user and starting it at boot time using the following script in /etc/init.d. #!/bin/sh # # Startup script for Tomcat JAVA_HOME=/usr/lib/jvm/java export JAVA_HOME start_tomcat=/home/tomcat/apache-tomcat-5.5.17/bin/startup.sh stop_tomcat=/home/tomcat/apache-tomcat-5.5.17/bin/shutdown.sh start() { echo -n "Starting tomcat: " su -c ${start_tomcat} - tomcat echo "done." } stop() { echo -n "Shutting down tomcat: " ${stop_tomcat} echo "done." } # See how we were called case "$1" in start) start ;; stop) stop ;; restart) stop sleep 10 start ;; *) echo "Usage: $0 {start|stop|restart}" esac I get following error output in my catalina.out file java.util.logging.ErrorManager: 4 java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17 /logs/localhost.2006-10-02.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.(FileOutputStream.java:177) at java.io.FileOutputStream.(FileOutputStream.java:102) at java.io.FileWriter.(FileWriter.java:61) at org.apache.juli.FileHandler.open(FileHandler.java:256) at org.apache.juli.FileHandler.(FileHandler.java:50) java.util.logging.ErrorManager: 4 java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17 /logs/admin.2006-10-02.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) . java.util.logging.ErrorManager: 4 java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17/logs/host- manager.2006-10-02.log (Permission denied) at java.io.FileOutputStream.openAppend(Native Method) As a result nothing is being logged. On checking I found that the log files were being created with owner as root instead of tomcat. Can someone please help me find where am i going wrong. Thanks Tejas
filtering tomcat logging using default logging configuration
I have a web application which is using a library which is generating too many messages. These are routed to catalina.out and all come from a particular producer (org.jgroups. is the prefix). I do not want to rework the logging to use log4j or the like, but I would like to suppress these WARN messages for this prefix. I guess I need to modify $TOMCAT_HOME/conf/logging.properties, but what do I need to add? I have read the Tomcat 5.5 logging page, but I am none the wiser as that does not seem to give any examples of filtering non-Tomcat messages. Thanks David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Logging
Good Morning Joe- Im going to take a guess at To: "Tomcat Users List" Sent: Thursday, March 30, 2006 3:06 PM Subject: Tomcat Logging > Is it possible to turn off Catalina's Commons logging > (from org.apache.catalina.*) in Tomcat 5.0 without > changing the debug level in log4j? > > Problem is I use log4j/commons for my application and > don't need to bother with the tomcat logs. > Unfortunately, Tomcat spits out a TON of DEBUG level > messages. Therefore making it difficult to use the > DEBUG level in my app. > > Thanks. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Tomcat Logging
Hello Joe, Joe Mun wrote: Is it possible to turn off Catalina's Commons logging (from org.apache.catalina.*) in Tomcat 5.0 without changing the debug level in log4j? Problem is I use log4j/commons for my application and don't need to bother with the tomcat logs. Unfortunately, Tomcat spits out a TON of DEBUG level messages. Therefore making it difficult to use the DEBUG level in my app. you have to separate server configuration log and application log. This can be achieved by putting needed JARs (WEB-INF/lib) and log4j.properties (WEB-INF/classes) at webapp level. Have a look at http://jakarta.apache.org/commons/logging/guide.html http://tomcat.apache.org/faq/logging.html http://tomcat.apache.org/tomcat-5.0-doc/class-loader-howto.html Regards Boris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Logging
Is it possible to turn off Catalina's Commons logging (from org.apache.catalina.*) in Tomcat 5.0 without changing the debug level in log4j? Problem is I use log4j/commons for my application and don't need to bother with the tomcat logs. Unfortunately, Tomcat spits out a TON of DEBUG level messages. Therefore making it difficult to use the DEBUG level in my app. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat logging from startup.bat
David Durham wrote: Hi- I'm using apache-tomcat-5.5.15 that I downloaded about 15 minutes ago. My installation is just to unzip to a directory, and run startup.bat. Strangely, the logger is set to debug somehow. The end the startup script because of a ton of digester DEBUG log statements going to the console. Does anyone know what causes this? Seem strange that my old install, 5.5.9 does not do this, while 5.5.15 does. Actually, it looks like this is my problem because now the old install is logging insanely as well. Apologies for the noise. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat logging from startup.bat
Hi- I'm using apache-tomcat-5.5.15 that I downloaded about 15 minutes ago. My installation is just to unzip to a directory, and run startup.bat. Strangely, the logger is set to debug somehow. The end the startup script because of a ton of digester DEBUG log statements going to the console. Does anyone know what causes this? Seem strange that my old install, 5.5.9 does not do this, while 5.5.15 does. Thanks, Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat logging - Persistence of Logs
Move the file to a new name in your startup script. On Mon Oct 31 12:59:07 CET 2005 Tomcat Users List wrote: I have a problem with log files. I have a customer who has Tomcat 5.0.28 running on Windows 2003 Server. The main output is being logged to stdout.log in the tomcat/logs directory - this is the Windows equivalent of catalina.out on a linux/unix system. The problem is that for good reasons the customer is stopping & restarting Tomcat every night (at our recommendation). This is a new app and it's not entirely bug-free yet, so giving thjem a clean start every day is useful. The trouble is that this also recreates stdout.log, which is a pity as sometime we aren't being alerted to problems until the day after, by which time the relevant log has disappeared. Does anyone know how to make the Windows stdout.log file persistent? Tom Burke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat logging - Persistence of Logs
in case it helps but you haven't already seen it, the verbosity of can be tweaked, see same page as in last reply. Can I just check what you are saying: are you saying that the standard output to the file which captures stdout is different on the 2 platforms, even with out-of-the-box TC config? This would be a surprise, I was under the impression that TC was functionally identical on whatever platform (the only difference really being the exact pathnames to files). So I just had a quick look at catalina.bat vs catalina.sh on 5.5.9 (my installed version) and it appears that there could be a difference: catalina.sh starts the bootstrap class with the redirection '>> "$CATALINA_BASE"/logs/catalina.out 2>&1' appended, whereas the windows bat file does nothing like this; there is no redirection at all that I can see, or even a mention of the logfile name. Maybe this explains what you're seeing - the gubbins that is output to the DOS window when you start in DOS is perhaps included in the log file instead when you run under linux? This is only a guess, I have not had time to check it out. > -Original Message- > From: Tom Burke [mailto:[EMAIL PROTECTED] > Sent: Monday 31 October 2005 16:21 > To: Tomcat Users List > Subject: Re: Tomcat logging - Persistence of Logs > > > Indeed, I have a daily log already but it doesn't seem to be > as verbose > as the stdout.log. > > I was just wondering if the default log - stdout.log in Windows, > catalina.out in linux - could be made to behave the same way > on the two > platforms. But it looks as if this is an OS-specific difference, as I > can't see any difference in the configuration files between the two > servers. > > Tom Burke > > > - Original Message - > From: "Steve Kirk" <[EMAIL PROTECTED]> > To: "'Tomcat Users List'" > Sent: Monday, October 31, 2005 12:52 PM > Subject: RE: Tomcat logging - Persistence of Logs > > > > > > The under 5.0.x uses -MM-DD format in the filename, so > > this > > would change each day, would that give you what you need? See > > "FileLogger" > > under "Standard Implementation" at: > > http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html > > > > PS note that is deprecated in 5.5.x > > > >> -Original Message- > >> From: Tom Burke [mailto:[EMAIL PROTECTED] > >> Sent: Monday 31 October 2005 11:59 > >> To: Tomcat Users List > >> Subject: Tomcat logging - Persistence of Logs > >> > >> > >> I have a problem with log files. I have a customer who has > >> Tomcat 5.0.28 > >> running on Windows 2003 Server. The main output is being logged to > >> stdout.log in the tomcat/logs directory - this is the Windows > >> equivalent > >> of catalina.out on a linux/unix system. > >> > >> The problem is that for good reasons the customer is stopping & > >> restarting Tomcat every night (at our recommendation). This > >> is a new app > >> and it's not entirely bug-free yet, so giving thjem a clean > >> start every > >> day is useful. The trouble is that this also recreates > >> stdout.log, which > >> is a pity as sometime we aren't being alerted to problems > >> until the day > >> after, by which time the relevant log has disappeared. > >> > >> Does anyone know how to make the Windows stdout.log file > persistent? > >> > >> Tom Burke > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat logging - Persistence of Logs
Indeed, I have a daily log already but it doesn't seem to be as verbose as the stdout.log. I was just wondering if the default log - stdout.log in Windows, catalina.out in linux - could be made to behave the same way on the two platforms. But it looks as if this is an OS-specific difference, as I can't see any difference in the configuration files between the two servers. Tom Burke - Original Message - From: "Steve Kirk" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" Sent: Monday, October 31, 2005 12:52 PM Subject: RE: Tomcat logging - Persistence of Logs The under 5.0.x uses -MM-DD format in the filename, so this would change each day, would that give you what you need? See "FileLogger" under "Standard Implementation" at: http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html PS note that is deprecated in 5.5.x -Original Message- From: Tom Burke [mailto:[EMAIL PROTECTED] Sent: Monday 31 October 2005 11:59 To: Tomcat Users List Subject: Tomcat logging - Persistence of Logs I have a problem with log files. I have a customer who has Tomcat 5.0.28 running on Windows 2003 Server. The main output is being logged to stdout.log in the tomcat/logs directory - this is the Windows equivalent of catalina.out on a linux/unix system. The problem is that for good reasons the customer is stopping & restarting Tomcat every night (at our recommendation). This is a new app and it's not entirely bug-free yet, so giving thjem a clean start every day is useful. The trouble is that this also recreates stdout.log, which is a pity as sometime we aren't being alerted to problems until the day after, by which time the relevant log has disappeared. Does anyone know how to make the Windows stdout.log file persistent? Tom Burke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat logging - Persistence of Logs
The under 5.0.x uses -MM-DD format in the filename, so this would change each day, would that give you what you need? See "FileLogger" under "Standard Implementation" at: http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html PS note that is deprecated in 5.5.x > -Original Message- > From: Tom Burke [mailto:[EMAIL PROTECTED] > Sent: Monday 31 October 2005 11:59 > To: Tomcat Users List > Subject: Tomcat logging - Persistence of Logs > > > I have a problem with log files. I have a customer who has > Tomcat 5.0.28 > running on Windows 2003 Server. The main output is being logged to > stdout.log in the tomcat/logs directory - this is the Windows > equivalent > of catalina.out on a linux/unix system. > > The problem is that for good reasons the customer is stopping & > restarting Tomcat every night (at our recommendation). This > is a new app > and it's not entirely bug-free yet, so giving thjem a clean > start every > day is useful. The trouble is that this also recreates > stdout.log, which > is a pity as sometime we aren't being alerted to problems > until the day > after, by which time the relevant log has disappeared. > > Does anyone know how to make the Windows stdout.log file persistent? > > Tom Burke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat logging - Persistence of Logs
I have a problem with log files. I have a customer who has Tomcat 5.0.28 running on Windows 2003 Server. The main output is being logged to stdout.log in the tomcat/logs directory - this is the Windows equivalent of catalina.out on a linux/unix system. The problem is that for good reasons the customer is stopping & restarting Tomcat every night (at our recommendation). This is a new app and it's not entirely bug-free yet, so giving thjem a clean start every day is useful. The trouble is that this also recreates stdout.log, which is a pity as sometime we aren't being alerted to problems until the day after, by which time the relevant log has disappeared. Does anyone know how to make the Windows stdout.log file persistent? Tom Burke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]