Re: Tomcat6+webapps+log4j
Em 28/01/2013 18:51, Mark Eggers escreveu: On 1/28/2013 10:06 AM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/28/13 11:25 AM, Tiago Sousa wrote: Em 28/01/2013 16:16, Christopher Schultz escreveu: Tiago, On 1/28/13 11:02 AM, Tiago Sousa wrote: Em 28/01/2013 15:41, Christopher Schultz escreveu: Tiago, On 1/28/13 8:49 AM, Tiago Sousa wrote: Thanks, one more time, for your reply. The problem with log4j 1.x is that it outputs the following error: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. I know that this is a common error, usually related with classpath problems. In my case, the configuration i'm using doesn´t seem to be have those sort of problems This is a symptom of having your log4j.properties in the wrong place. You never said anything about using Tomcat Embedded. If you are using Embedded Tomcat, you'll have to make sure that your log4j.properties file is in the CLASSPATH of the JVM when it starts. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. Thanks for your reply. Isn´t that assured (log4j in classpath) putting the log4j.properties in apache lib folder since i'm using tomcat 6.x? If you are using Tomcat Embedded, you are entirely responsible for your own CLASSPATH. The Embedded class causes the logger to be initialized before any real code gets executed (it's in the first static initializer in the class), so Embedded can't change the CLASSPATH or launch a new ClassLoader for that purpose. Can you please describe your environment? It's been tough to get details from you. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi, Sorry, i am a newbie in tomcat issues. I'm just following orders... :-) My configuration is the most standard i could find: 1 step: download apache-tomcat-6.0.36.zip from apache.org 2 - unzip 3 - erase logging.properties from conf folder 4 - copy jar files (juli and juli-adapters)from extras to bin and lib directories, respectively. 5 - create a logging.properties file (standard definitions as in apache.org) and put it in lib folder. 6- download log4j.1.2.7.jar and put it in lib folder. And that's it. I'm using tomcat in windows. Hope this helps you to help me... So where does the Embedded class come in? How do you launch Tomcat? - -chris I just tried this - finally upgraded to 6.0.36 on this machine (been using 7.0.x, so I haven't thought much about it). OS: Windows 7 Home Premium 64 bit JRE:1.7.0_11 64 bit Tomcat: 6.0.36 Editor: jEdit I normally use Cygwin to unpack the zip file and edit stuff, but that can leave ownership / permissions in strange states. So this time I did the following. 1. Unpack the zip file in C:\Users\me\Apache\apache-6.0.36 (IZArc) 2. Make the appropriate edits to %CATALINA_HOME%\conf\tomcat-users.xml 3. Add setenv.bat to %CATALINA_HOME%\bin for JMX 4. Add URIEncoding=UTF-8 to Connector elements 5. Enable AccessLogValve 6. Add MySQL and mail jars to %CATALINA_HOME%\lib for some applications Double-clicking on startup.bat from Windows Explorer results in the expected execution. I get entries in the appropriate log files. Now I do the following: 1. back up tomcat-juli.jar 2. replace it with the tomcat-juli.jar from Extras 3. add log4j-1.2.17.jar to %CATALINA_HOME%\lib 4. add tomcat-juli-adapters.jar to %CATALINA_HOME%\lib 5. Create log4j.properties a. Copy from Tomcat web site b. Save in %CATALINA_HOME%\conf 6. Remove logging.properties from %CATALINA_HOME%\conf Start Tomcat by double-clicking startup.bat in %CATALINA_HOME%\bin from Windows Explorer. The result: I get the same warning (No appenders could be found for logger (org.apache.catalina.startup.Embedded). I get no log files in %CATALINA_HOME%\logs other than the access log. I also verified that I have no web applications with log4j-1.2.17.jar in a WEB-INF/lib, nor do I have log4j.xml floating around in %CATALINA_HOME%\webapps. I'm not a Windows person and normally just use JULI logging for Tomcat. So maybe I've done something wrong . . . dunno. Hmm. Maybe I'll try rewriting the log4j.properties as log4j.xml. . . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. I guess that in your case you just have to put your log4j.properties in the lib folder, not the conf folder. Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For
Re: Tomcat6+webapps+log4j
On 1/29/2013 2:40 AM, Tiago Sousa wrote: Em 28/01/2013 18:51, Mark Eggers escreveu: On 1/28/2013 10:06 AM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/28/13 11:25 AM, Tiago Sousa wrote: Em 28/01/2013 16:16, Christopher Schultz escreveu: Tiago, On 1/28/13 11:02 AM, Tiago Sousa wrote: Em 28/01/2013 15:41, Christopher Schultz escreveu: Tiago, On 1/28/13 8:49 AM, Tiago Sousa wrote: Thanks, one more time, for your reply. The problem with log4j 1.x is that it outputs the following error: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. I know that this is a common error, usually related with classpath problems. In my case, the configuration i'm using doesn´t seem to be have those sort of problems This is a symptom of having your log4j.properties in the wrong place. You never said anything about using Tomcat Embedded. If you are using Embedded Tomcat, you'll have to make sure that your log4j.properties file is in the CLASSPATH of the JVM when it starts. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. Thanks for your reply. Isn´t that assured (log4j in classpath) putting the log4j.properties in apache lib folder since i'm using tomcat 6.x? If you are using Tomcat Embedded, you are entirely responsible for your own CLASSPATH. The Embedded class causes the logger to be initialized before any real code gets executed (it's in the first static initializer in the class), so Embedded can't change the CLASSPATH or launch a new ClassLoader for that purpose. Can you please describe your environment? It's been tough to get details from you. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi, Sorry, i am a newbie in tomcat issues. I'm just following orders... :-) My configuration is the most standard i could find: 1 step: download apache-tomcat-6.0.36.zip from apache.org 2 - unzip 3 - erase logging.properties from conf folder 4 - copy jar files (juli and juli-adapters)from extras to bin and lib directories, respectively. 5 - create a logging.properties file (standard definitions as in apache.org) and put it in lib folder. 6- download log4j.1.2.7.jar and put it in lib folder. And that's it. I'm using tomcat in windows. Hope this helps you to help me... So where does the Embedded class come in? How do you launch Tomcat? - -chris I just tried this - finally upgraded to 6.0.36 on this machine (been using 7.0.x, so I haven't thought much about it). OS: Windows 7 Home Premium 64 bit JRE:1.7.0_11 64 bit Tomcat: 6.0.36 Editor: jEdit I normally use Cygwin to unpack the zip file and edit stuff, but that can leave ownership / permissions in strange states. So this time I did the following. 1. Unpack the zip file in C:\Users\me\Apache\apache-6.0.36 (IZArc) 2. Make the appropriate edits to %CATALINA_HOME%\conf\tomcat-users.xml 3. Add setenv.bat to %CATALINA_HOME%\bin for JMX 4. Add URIEncoding=UTF-8 to Connector elements 5. Enable AccessLogValve 6. Add MySQL and mail jars to %CATALINA_HOME%\lib for some applications Double-clicking on startup.bat from Windows Explorer results in the expected execution. I get entries in the appropriate log files. Now I do the following: 1. back up tomcat-juli.jar 2. replace it with the tomcat-juli.jar from Extras 3. add log4j-1.2.17.jar to %CATALINA_HOME%\lib 4. add tomcat-juli-adapters.jar to %CATALINA_HOME%\lib 5. Create log4j.properties a. Copy from Tomcat web site b. Save in %CATALINA_HOME%\conf 6. Remove logging.properties from %CATALINA_HOME%\conf Start Tomcat by double-clicking startup.bat in %CATALINA_HOME%\bin from Windows Explorer. The result: I get the same warning (No appenders could be found for logger (org.apache.catalina.startup.Embedded). I get no log files in %CATALINA_HOME%\logs other than the access log. I also verified that I have no web applications with log4j-1.2.17.jar in a WEB-INF/lib, nor do I have log4j.xml floating around in %CATALINA_HOME%\webapps. I'm not a Windows person and normally just use JULI logging for Tomcat. So maybe I've done something wrong . . . dunno. Hmm. Maybe I'll try rewriting the log4j.properties as log4j.xml. . . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. I guess that in your case you just have to put your log4j.properties in the lib folder, not the conf folder. Tiago - To unsubscribe, e-mail:
Re: Tomcat6+webapps+log4j
Em 25/01/2013 19:39, Christopher Schultz escreveu: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/25/13 4:45 AM, Tiago Sousa wrote: Em 25/01/2013 08:59, Konstantin Kolinko escreveu: 2013/1/24 Tiago Sousa tiago-a-so...@ext.ptinovacao.pt: Hello to all. I have tomcat 6 Which version? I'm using tomcat 6.0.16. Did you install it from a zip file downloaded from tomcat.apache.org? Yes, i installed using a zip file downloaded from tomcat.apache.org. using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. OK, but make sure that all jars are in their proper places. Sometimes people read the doc incorrectly. http://tomcat.apache.org/tomcat-6.0-doc/logging.html Ok, i think i've done it, namely: * Put|log4j.jar|and|tomcat-juli-adapters.jar|from extras into|$CATALINA_HOME/lib|. * Replace|$CATALINA_HOME/bin/tomcat-juli.jar|with|tomcat-juli.jar|from extras. The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Which tutorial did you follow? The one you mentioned: http://tomcat.apache.org/tomcat-6.0-doc/logging.html Did you configure them to be written to ${catalina.base}/logs ? Maybe it tries to write them elsewhere? It is configured in its standard version ( http://tomcat.apache.org/tomcat-6.0-doc/logging.html), which i am using. Is the file readable? There is no file, tomcat does not create one and that is my problem. I think Konstantin meant is the config file readable or perhaps is the logs/ directory writable. Of course, all permissions must be relative to the effective uid running Tomcat. Check catalina.out. If you don't have a log4j.properties file (or similar) available, I believe you'll get a message on stdout saying You haven't configured log4j properly and you won't get any further log messages anywhere. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEC330ACgkQ9CaO5/Lv0PBrVQCfb9A0KMGRe0aoqRSeYrHT1WNx 0lwAn3ed8h09a7fv7Vg4jCgerDUrPFD1 =G3j0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. Just another symptom: initially i also thought that could be a permissions problem but it's strange that JULI could create the log file while log4j couldn´t. I've tried several other approaches but in none the files were created. I´ve tried the same configuration in Linux. A catalina.out file was created but the other log files: manager, host-manager, admin weren´t. Any ideas? Thanks. Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
Em 25/01/2013 19:39, Christopher Schultz escreveu: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/25/13 4:45 AM, Tiago Sousa wrote: Em 25/01/2013 08:59, Konstantin Kolinko escreveu: 2013/1/24 Tiago Sousa tiago-a-so...@ext.ptinovacao.pt: Hello to all. I have tomcat 6 Which version? I'm using tomcat 6.0.16. Did you install it from a zip file downloaded from tomcat.apache.org? Yes, i installed using a zip file downloaded from tomcat.apache.org. using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. OK, but make sure that all jars are in their proper places. Sometimes people read the doc incorrectly. http://tomcat.apache.org/tomcat-6.0-doc/logging.html Ok, i think i've done it, namely: * Put|log4j.jar|and|tomcat-juli-adapters.jar|from extras into|$CATALINA_HOME/lib|. * Replace|$CATALINA_HOME/bin/tomcat-juli.jar|with|tomcat-juli.jar|from extras. The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Which tutorial did you follow? The one you mentioned: http://tomcat.apache.org/tomcat-6.0-doc/logging.html Did you configure them to be written to ${catalina.base}/logs ? Maybe it tries to write them elsewhere? It is configured in its standard version ( http://tomcat.apache.org/tomcat-6.0-doc/logging.html), which i am using. Is the file readable? There is no file, tomcat does not create one and that is my problem. I think Konstantin meant is the config file readable or perhaps is the logs/ directory writable. Of course, all permissions must be relative to the effective uid running Tomcat. Check catalina.out. If you don't have a log4j.properties file (or similar) available, I believe you'll get a message on stdout saying You haven't configured log4j properly and you won't get any further log messages anywhere. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEC330ACgkQ9CaO5/Lv0PBrVQCfb9A0KMGRe0aoqRSeYrHT1WNx 0lwAn3ed8h09a7fv7Vg4jCgerDUrPFD1 =G3j0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi... Just a final tip, i´m using log4j-api-2.0-beta3 as my log4j.jar (without renaming it). Any problem with that? Thanks. Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
2013/1/28 Tiago Sousa tiago-a-so...@ext.ptinovacao.pt: Em 25/01/2013 19:39, Christopher Schultz escreveu: On 1/25/13 4:45 AM, Tiago Sousa wrote: Em 25/01/2013 08:59, Konstantin Kolinko escreveu: 2013/1/24 Tiago Sousa tiago-a-so...@ext.ptinovacao.pt: Hello to all. I have tomcat 6 Which version? I'm using tomcat 6.0.16. Did you install it from a zip file downloaded from tomcat.apache.org? Yes, i installed using a zip file downloaded from tomcat.apache.org. using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. OK, but make sure that all jars are in their proper places. Sometimes people read the doc incorrectly. http://tomcat.apache.org/tomcat-6.0-doc/logging.html Ok, i think i've done it, namely: * Put|log4j.jar|and|tomcat-juli-adapters.jar|from extras into|$CATALINA_HOME/lib|. * Replace|$CATALINA_HOME/bin/tomcat-juli.jar|with|tomcat-juli.jar|from extras. The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Which tutorial did you follow? The one you mentioned: http://tomcat.apache.org/tomcat-6.0-doc/logging.html Did you configure them to be written to ${catalina.base}/logs ? Maybe it tries to write them elsewhere? It is configured in its standard version ( http://tomcat.apache.org/tomcat-6.0-doc/logging.html), which i am using. Is the file readable? There is no file, tomcat does not create one and that is my problem. I think Konstantin meant is the config file readable or perhaps is the logs/ directory writable. Of course, all permissions must be relative to the effective uid running Tomcat. Check catalina.out. If you don't have a log4j.properties file (or similar) available, I believe you'll get a message on stdout saying You haven't configured log4j properly and you won't get any further log messages anywhere. Hi... Just a final tip, i´m using log4j-api-2.0-beta3 as my log4j.jar (without renaming it). Any problem with that? File name is not a problem, but using a wrong version of the library is a problem. There are a couple of issues to start 1. The Apache Commons Logging library is designed and compiled to use Log4J 1.x Log4J 2 docs say that you need an adapter to use it with Commons Logging. (I have not used it yet so I do not know what mileage is here). YMMV. 2. log4j.properties is not a valid configuration file for log4j 2. Its configuration files are either XML or JSON. http://logging.apache.org/log4j/2.x/manual/configuration.html Try with 1.2.17 http://logging.apache.org/log4j/1.2/download.html Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
Em 28/01/2013 12:56, Konstantin Kolinko escreveu: 2013/1/28 Tiago Sousa tiago-a-so...@ext.ptinovacao.pt: Em 25/01/2013 19:39, Christopher Schultz escreveu: On 1/25/13 4:45 AM, Tiago Sousa wrote: Em 25/01/2013 08:59, Konstantin Kolinko escreveu: 2013/1/24 Tiago Sousa tiago-a-so...@ext.ptinovacao.pt: Hello to all. I have tomcat 6 Which version? I'm using tomcat 6.0.16. Did you install it from a zip file downloaded from tomcat.apache.org? Yes, i installed using a zip file downloaded from tomcat.apache.org. using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. OK, but make sure that all jars are in their proper places. Sometimes people read the doc incorrectly. http://tomcat.apache.org/tomcat-6.0-doc/logging.html Ok, i think i've done it, namely: * Put|log4j.jar|and|tomcat-juli-adapters.jar|from extras into|$CATALINA_HOME/lib|. * Replace|$CATALINA_HOME/bin/tomcat-juli.jar|with|tomcat-juli.jar|from extras. The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Which tutorial did you follow? The one you mentioned: http://tomcat.apache.org/tomcat-6.0-doc/logging.html Did you configure them to be written to ${catalina.base}/logs ? Maybe it tries to write them elsewhere? It is configured in its standard version ( http://tomcat.apache.org/tomcat-6.0-doc/logging.html), which i am using. Is the file readable? There is no file, tomcat does not create one and that is my problem. I think Konstantin meant is the config file readable or perhaps is the logs/ directory writable. Of course, all permissions must be relative to the effective uid running Tomcat. Check catalina.out. If you don't have a log4j.properties file (or similar) available, I believe you'll get a message on stdout saying You haven't configured log4j properly and you won't get any further log messages anywhere. Hi... Just a final tip, i´m using log4j-api-2.0-beta3 as my log4j.jar (without renaming it). Any problem with that? File name is not a problem, but using a wrong version of the library is a problem. There are a couple of issues to start 1. The Apache Commons Logging library is designed and compiled to use Log4J 1.x Log4J 2 docs say that you need an adapter to use it with Commons Logging. (I have not used it yet so I do not know what mileage is here). YMMV. 2. log4j.properties is not a valid configuration file for log4j 2. Its configuration files are either XML or JSON. http://logging.apache.org/log4j/2.x/manual/configuration.html Try with 1.2.17 http://logging.apache.org/log4j/1.2/download.html Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi, Thanks, one more time, for your reply. The problem with log4j 1.x is that it outputs the following error: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. I know that this is a common error, usually related with classpath problems. In my case, the configuration i'm using doesn´t seem to be have those sort of problems Any idea? Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/28/13 6:03 AM, Tiago Sousa wrote: Just another symptom: initially i also thought that could be a permissions problem but it's strange that JULI could create the log file while log4j couldn´t. I've tried several other approaches but in none the files were created. I´ve tried the same configuration in Linux. A catalina.out file was created but the other log files: manager, host-manager, admin weren´t. Note that catalina.out is created via shell redirection (if you use startup scripts) or by fd redirection (if you use jsvc, procrun, etc.) while the other logs are all done by the Java-based logging mechanism. If you haven't configured JULI or log4j properly, you'll get no logs except for catalina.out. I think it's actually possible to launch your JVM in such a way that the script (or jsvc/procrun) has write permissions but the JVM does not. You'd probably have to really make a mess of your configuration to achieve that, but it's technically possible. Double-check your process table to see who the effective uid is, just in case. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEGmxMACgkQ9CaO5/Lv0PAH0gCgpXLn2KClGbpbk0hs8XPkJvnG jh8AniWaKGQlqIcA5Ex2yMyWmK39N4Jq =78hN -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/28/13 8:49 AM, Tiago Sousa wrote: Thanks, one more time, for your reply. The problem with log4j 1.x is that it outputs the following error: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. I know that this is a common error, usually related with classpath problems. In my case, the configuration i'm using doesn´t seem to be have those sort of problems This is a symptom of having your log4j.properties in the wrong place. You never said anything about using Tomcat Embedded. If you are using Embedded Tomcat, you'll have to make sure that your log4j.properties file is in the CLASSPATH of the JVM when it starts. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEGnBcACgkQ9CaO5/Lv0PCGeQCfdQvJ+vyTLdsHcrwCpCnoTppE Rp8An3UKaCGB4wMzd7C6ScoidsQtXTKG =BTbI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
Em 28/01/2013 15:41, Christopher Schultz escreveu: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/28/13 8:49 AM, Tiago Sousa wrote: Thanks, one more time, for your reply. The problem with log4j 1.x is that it outputs the following error: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. I know that this is a common error, usually related with classpath problems. In my case, the configuration i'm using doesn´t seem to be have those sort of problems This is a symptom of having your log4j.properties in the wrong place. You never said anything about using Tomcat Embedded. If you are using Embedded Tomcat, you'll have to make sure that your log4j.properties file is in the CLASSPATH of the JVM when it starts. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEGnBcACgkQ9CaO5/Lv0PCGeQCfdQvJ+vyTLdsHcrwCpCnoTppE Rp8An3UKaCGB4wMzd7C6ScoidsQtXTKG =BTbI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. Thanks for your reply. Isn´t that assured (log4j in classpath) putting the log4j.properties in apache lib folder since i'm using tomcat 6.x? Thanks again. Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/28/13 11:02 AM, Tiago Sousa wrote: Em 28/01/2013 15:41, Christopher Schultz escreveu: Tiago, On 1/28/13 8:49 AM, Tiago Sousa wrote: Thanks, one more time, for your reply. The problem with log4j 1.x is that it outputs the following error: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. I know that this is a common error, usually related with classpath problems. In my case, the configuration i'm using doesn´t seem to be have those sort of problems This is a symptom of having your log4j.properties in the wrong place. You never said anything about using Tomcat Embedded. If you are using Embedded Tomcat, you'll have to make sure that your log4j.properties file is in the CLASSPATH of the JVM when it starts. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. Thanks for your reply. Isn´t that assured (log4j in classpath) putting the log4j.properties in apache lib folder since i'm using tomcat 6.x? If you are using Tomcat Embedded, you are entirely responsible for your own CLASSPATH. The Embedded class causes the logger to be initialized before any real code gets executed (it's in the first static initializer in the class), so Embedded can't change the CLASSPATH or launch a new ClassLoader for that purpose. Can you please describe your environment? It's been tough to get details from you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEGpFUACgkQ9CaO5/Lv0PCXmACgjoQhdKJ0czXMdIAfYKwOsOpH D4UAnjTr99Jd/sebfuP5IhOJLYB6a+On =ocWz -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
Em 28/01/2013 16:16, Christopher Schultz escreveu: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/28/13 11:02 AM, Tiago Sousa wrote: Em 28/01/2013 15:41, Christopher Schultz escreveu: Tiago, On 1/28/13 8:49 AM, Tiago Sousa wrote: Thanks, one more time, for your reply. The problem with log4j 1.x is that it outputs the following error: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. I know that this is a common error, usually related with classpath problems. In my case, the configuration i'm using doesn´t seem to be have those sort of problems This is a symptom of having your log4j.properties in the wrong place. You never said anything about using Tomcat Embedded. If you are using Embedded Tomcat, you'll have to make sure that your log4j.properties file is in the CLASSPATH of the JVM when it starts. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. Thanks for your reply. Isn´t that assured (log4j in classpath) putting the log4j.properties in apache lib folder since i'm using tomcat 6.x? If you are using Tomcat Embedded, you are entirely responsible for your own CLASSPATH. The Embedded class causes the logger to be initialized before any real code gets executed (it's in the first static initializer in the class), so Embedded can't change the CLASSPATH or launch a new ClassLoader for that purpose. Can you please describe your environment? It's been tough to get details from you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEGpFUACgkQ9CaO5/Lv0PCXmACgjoQhdKJ0czXMdIAfYKwOsOpH D4UAnjTr99Jd/sebfuP5IhOJLYB6a+On =ocWz -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi, Sorry, i am a newbie in tomcat issues. I'm just following orders... :-) My configuration is the most standard i could find: 1 step: download apache-tomcat-6.0.36.zip from apache.org 2 - unzip 3 - erase logging.properties from conf folder 4 - copy jar files (juli and juli-adapters)from extras to bin and lib directories, respectively. 5 - create a logging.properties file (standard definitions as in apache.org) and put it in lib folder. 6- download log4j.1.2.7.jar and put it in lib folder. And that's it. I'm using tomcat in windows. Hope this helps you to help me... Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/28/13 11:25 AM, Tiago Sousa wrote: Em 28/01/2013 16:16, Christopher Schultz escreveu: Tiago, On 1/28/13 11:02 AM, Tiago Sousa wrote: Em 28/01/2013 15:41, Christopher Schultz escreveu: Tiago, On 1/28/13 8:49 AM, Tiago Sousa wrote: Thanks, one more time, for your reply. The problem with log4j 1.x is that it outputs the following error: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. I know that this is a common error, usually related with classpath problems. In my case, the configuration i'm using doesn´t seem to be have those sort of problems This is a symptom of having your log4j.properties in the wrong place. You never said anything about using Tomcat Embedded. If you are using Embedded Tomcat, you'll have to make sure that your log4j.properties file is in the CLASSPATH of the JVM when it starts. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. Thanks for your reply. Isn´t that assured (log4j in classpath) putting the log4j.properties in apache lib folder since i'm using tomcat 6.x? If you are using Tomcat Embedded, you are entirely responsible for your own CLASSPATH. The Embedded class causes the logger to be initialized before any real code gets executed (it's in the first static initializer in the class), so Embedded can't change the CLASSPATH or launch a new ClassLoader for that purpose. Can you please describe your environment? It's been tough to get details from you. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi, Sorry, i am a newbie in tomcat issues. I'm just following orders... :-) My configuration is the most standard i could find: 1 step: download apache-tomcat-6.0.36.zip from apache.org 2 - unzip 3 - erase logging.properties from conf folder 4 - copy jar files (juli and juli-adapters)from extras to bin and lib directories, respectively. 5 - create a logging.properties file (standard definitions as in apache.org) and put it in lib folder. 6- download log4j.1.2.7.jar and put it in lib folder. And that's it. I'm using tomcat in windows. Hope this helps you to help me... So where does the Embedded class come in? How do you launch Tomcat? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEGvh0ACgkQ9CaO5/Lv0PBTegCghwcFu8BHD+f1ypRitUCopu7q QToAnjYdCSgrUwnS1LzaGfa7zFujJtwN =83/y -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
Em 28/01/2013 18:06, Christopher Schultz escreveu: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/28/13 11:25 AM, Tiago Sousa wrote: Em 28/01/2013 16:16, Christopher Schultz escreveu: Tiago, On 1/28/13 11:02 AM, Tiago Sousa wrote: Em 28/01/2013 15:41, Christopher Schultz escreveu: Tiago, On 1/28/13 8:49 AM, Tiago Sousa wrote: Thanks, one more time, for your reply. The problem with log4j 1.x is that it outputs the following error: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. I know that this is a common error, usually related with classpath problems. In my case, the configuration i'm using doesn´t seem to be have those sort of problems This is a symptom of having your log4j.properties in the wrong place. You never said anything about using Tomcat Embedded. If you are using Embedded Tomcat, you'll have to make sure that your log4j.properties file is in the CLASSPATH of the JVM when it starts. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. Thanks for your reply. Isn´t that assured (log4j in classpath) putting the log4j.properties in apache lib folder since i'm using tomcat 6.x? If you are using Tomcat Embedded, you are entirely responsible for your own CLASSPATH. The Embedded class causes the logger to be initialized before any real code gets executed (it's in the first static initializer in the class), so Embedded can't change the CLASSPATH or launch a new ClassLoader for that purpose. Can you please describe your environment? It's been tough to get details from you. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi, Sorry, i am a newbie in tomcat issues. I'm just following orders... :-) My configuration is the most standard i could find: 1 step: download apache-tomcat-6.0.36.zip from apache.org 2 - unzip 3 - erase logging.properties from conf folder 4 - copy jar files (juli and juli-adapters)from extras to bin and lib directories, respectively. 5 - create a logging.properties file (standard definitions as in apache.org) and put it in lib folder. 6- download log4j.1.2.7.jar and put it in lib folder. And that's it. I'm using tomcat in windows. Hope this helps you to help me... So where does the Embedded class come in? How do you launch Tomcat? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEGvh0ACgkQ9CaO5/Lv0PBTegCghwcFu8BHD+f1ypRitUCopu7q QToAnjYdCSgrUwnS1LzaGfa7zFujJtwN =83/y -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. I start Tomcat using the startup script bin/startup.bat. Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
On 1/28/2013 10:06 AM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/28/13 11:25 AM, Tiago Sousa wrote: Em 28/01/2013 16:16, Christopher Schultz escreveu: Tiago, On 1/28/13 11:02 AM, Tiago Sousa wrote: Em 28/01/2013 15:41, Christopher Schultz escreveu: Tiago, On 1/28/13 8:49 AM, Tiago Sousa wrote: Thanks, one more time, for your reply. The problem with log4j 1.x is that it outputs the following error: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. I know that this is a common error, usually related with classpath problems. In my case, the configuration i'm using doesn´t seem to be have those sort of problems This is a symptom of having your log4j.properties in the wrong place. You never said anything about using Tomcat Embedded. If you are using Embedded Tomcat, you'll have to make sure that your log4j.properties file is in the CLASSPATH of the JVM when it starts. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. Thanks for your reply. Isn´t that assured (log4j in classpath) putting the log4j.properties in apache lib folder since i'm using tomcat 6.x? If you are using Tomcat Embedded, you are entirely responsible for your own CLASSPATH. The Embedded class causes the logger to be initialized before any real code gets executed (it's in the first static initializer in the class), so Embedded can't change the CLASSPATH or launch a new ClassLoader for that purpose. Can you please describe your environment? It's been tough to get details from you. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi, Sorry, i am a newbie in tomcat issues. I'm just following orders... :-) My configuration is the most standard i could find: 1 step: download apache-tomcat-6.0.36.zip from apache.org 2 - unzip 3 - erase logging.properties from conf folder 4 - copy jar files (juli and juli-adapters)from extras to bin and lib directories, respectively. 5 - create a logging.properties file (standard definitions as in apache.org) and put it in lib folder. 6- download log4j.1.2.7.jar and put it in lib folder. And that's it. I'm using tomcat in windows. Hope this helps you to help me... So where does the Embedded class come in? How do you launch Tomcat? - -chris I just tried this - finally upgraded to 6.0.36 on this machine (been using 7.0.x, so I haven't thought much about it). OS: Windows 7 Home Premium 64 bit JRE:1.7.0_11 64 bit Tomcat: 6.0.36 Editor: jEdit I normally use Cygwin to unpack the zip file and edit stuff, but that can leave ownership / permissions in strange states. So this time I did the following. 1. Unpack the zip file in C:\Users\me\Apache\apache-6.0.36 (IZArc) 2. Make the appropriate edits to %CATALINA_HOME%\conf\tomcat-users.xml 3. Add setenv.bat to %CATALINA_HOME%\bin for JMX 4. Add URIEncoding=UTF-8 to Connector elements 5. Enable AccessLogValve 6. Add MySQL and mail jars to %CATALINA_HOME%\lib for some applications Double-clicking on startup.bat from Windows Explorer results in the expected execution. I get entries in the appropriate log files. Now I do the following: 1. back up tomcat-juli.jar 2. replace it with the tomcat-juli.jar from Extras 3. add log4j-1.2.17.jar to %CATALINA_HOME%\lib 4. add tomcat-juli-adapters.jar to %CATALINA_HOME%\lib 5. Create log4j.properties a. Copy from Tomcat web site b. Save in %CATALINA_HOME%\conf 6. Remove logging.properties from %CATALINA_HOME%\conf Start Tomcat by double-clicking startup.bat in %CATALINA_HOME%\bin from Windows Explorer. The result: I get the same warning (No appenders could be found for logger (org.apache.catalina.startup.Embedded). I get no log files in %CATALINA_HOME%\logs other than the access log. I also verified that I have no web applications with log4j-1.2.17.jar in a WEB-INF/lib, nor do I have log4j.xml floating around in %CATALINA_HOME%\webapps. I'm not a Windows person and normally just use JULI logging for Tomcat. So maybe I've done something wrong . . . dunno. Hmm. Maybe I'll try rewriting the log4j.properties as log4j.xml. . . . . 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: Tomcat6+webapps+log4j
Em 25/01/2013 19:39, Christopher Schultz escreveu: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/25/13 4:45 AM, Tiago Sousa wrote: Em 25/01/2013 08:59, Konstantin Kolinko escreveu: 2013/1/24 Tiago Sousa tiago-a-so...@ext.ptinovacao.pt: Hello to all. I have tomcat 6 Which version? I'm using tomcat 6.0.16. Did you install it from a zip file downloaded from tomcat.apache.org? Yes, i installed using a zip file downloaded from tomcat.apache.org. using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. OK, but make sure that all jars are in their proper places. Sometimes people read the doc incorrectly. http://tomcat.apache.org/tomcat-6.0-doc/logging.html Ok, i think i've done it, namely: * Put|log4j.jar|and|tomcat-juli-adapters.jar|from extras into|$CATALINA_HOME/lib|. * Replace|$CATALINA_HOME/bin/tomcat-juli.jar|with|tomcat-juli.jar|from extras. The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Which tutorial did you follow? The one you mentioned: http://tomcat.apache.org/tomcat-6.0-doc/logging.html Did you configure them to be written to ${catalina.base}/logs ? Maybe it tries to write them elsewhere? It is configured in its standard version ( http://tomcat.apache.org/tomcat-6.0-doc/logging.html), which i am using. Is the file readable? There is no file, tomcat does not create one and that is my problem. I think Konstantin meant is the config file readable or perhaps is the logs/ directory writable. Of course, all permissions must be relative to the effective uid running Tomcat. Check catalina.out. If you don't have a log4j.properties file (or similar) available, I believe you'll get a message on stdout saying You haven't configured log4j properly and you won't get any further log messages anywhere. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEC330ACgkQ9CaO5/Lv0PBrVQCfb9A0KMGRe0aoqRSeYrHT1WNx 0lwAn3ed8h09a7fv7Vg4jCgerDUrPFD1 =G3j0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hello. Thanks for the reply. Yes, the config file is readable as the logs directory. I don´t have any catalina.out file because log4j is not able to create it. Thanks for the help. Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
2013/1/24 Tiago Sousa tiago-a-so...@ext.ptinovacao.pt: Hello to all. I have tomcat 6 Which version? Did you install it from a zip file downloaded from tomcat.apache.org? using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. OK, but make sure that all jars are in their proper places. Sometimes people read the doc incorrectly. http://tomcat.apache.org/tomcat-6.0-doc/logging.html The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Which tutorial did you follow? Did you configure them to be written to ${catalina.base}/logs ? Maybe it tries to write them elsewhere? Is the file readable? Can you help me saying what mistakes i am doing in this basic configuration (tomcat and no apps)? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
Hi. Thanks for your reply. My answers follows below. Em 25/01/2013 08:59, Konstantin Kolinko escreveu: 2013/1/24 Tiago Sousa tiago-a-so...@ext.ptinovacao.pt: Hello to all. I have tomcat 6 Which version? I'm using tomcat 6.0.16. Did you install it from a zip file downloaded from tomcat.apache.org? Yes, i installed using a zip file downloaded from tomcat.apache.org. using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. OK, but make sure that all jars are in their proper places. Sometimes people read the doc incorrectly. http://tomcat.apache.org/tomcat-6.0-doc/logging.html Ok, i think i've done it, namely: * Put|log4j.jar|and|tomcat-juli-adapters.jar|from extras into|$CATALINA_HOME/lib|. * Replace|$CATALINA_HOME/bin/tomcat-juli.jar|with|tomcat-juli.jar|from extras. The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Which tutorial did you follow? The one you mentioned: http://tomcat.apache.org/tomcat-6.0-doc/logging.html Did you configure them to be written to ${catalina.base}/logs ? Maybe it tries to write them elsewhere? It is configured in its standard version ( http://tomcat.apache.org/tomcat-6.0-doc/logging.html), which i am using. Is the file readable? There is no file, tomcat does not create one and that is my problem. Can you help me saying what mistakes i am doing in this basic configuration (tomcat and no apps)? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org thanks again. Tiago
Re: Tomcat6+webapps+log4j
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tiago, On 1/25/13 4:45 AM, Tiago Sousa wrote: Em 25/01/2013 08:59, Konstantin Kolinko escreveu: 2013/1/24 Tiago Sousa tiago-a-so...@ext.ptinovacao.pt: Hello to all. I have tomcat 6 Which version? I'm using tomcat 6.0.16. Did you install it from a zip file downloaded from tomcat.apache.org? Yes, i installed using a zip file downloaded from tomcat.apache.org. using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. OK, but make sure that all jars are in their proper places. Sometimes people read the doc incorrectly. http://tomcat.apache.org/tomcat-6.0-doc/logging.html Ok, i think i've done it, namely: * Put|log4j.jar|and|tomcat-juli-adapters.jar|from extras into|$CATALINA_HOME/lib|. * Replace|$CATALINA_HOME/bin/tomcat-juli.jar|with|tomcat-juli.jar|from extras. The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Which tutorial did you follow? The one you mentioned: http://tomcat.apache.org/tomcat-6.0-doc/logging.html Did you configure them to be written to ${catalina.base}/logs ? Maybe it tries to write them elsewhere? It is configured in its standard version ( http://tomcat.apache.org/tomcat-6.0-doc/logging.html), which i am using. Is the file readable? There is no file, tomcat does not create one and that is my problem. I think Konstantin meant is the config file readable or perhaps is the logs/ directory writable. Of course, all permissions must be relative to the effective uid running Tomcat. Check catalina.out. If you don't have a log4j.properties file (or similar) available, I believe you'll get a message on stdout saying You haven't configured log4j properly and you won't get any further log messages anywhere. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEC330ACgkQ9CaO5/Lv0PBrVQCfb9A0KMGRe0aoqRSeYrHT1WNx 0lwAn3ed8h09a7fv7Vg4jCgerDUrPFD1 =G3j0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat6+webapps+log4j
Hello to all. I have tomcat 6 using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Can you help me saying what mistakes i am doing in this basic configuration (tomcat and no apps)? Thanks. Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat6+webapps+log4j
You might try putting the log4j properties file (or xml) in a shared loader location. In catalina.properties add something like this: shared.loader=${catalina.base}/conf/properties and then put the properties file there. ~Justin -Original Message- From: Tiago Sousa [mailto:tiago-a-so...@ext.ptinovacao.pt] Sent: Thursday, January 24, 2013 10:01 AM To: users@tomcat.apache.org Subject: Tomcat6+webapps+log4j Hello to all. I have tomcat 6 using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Can you help me saying what mistakes i am doing in this basic configuration (tomcat and no apps)? Thanks. Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org CONFIDENTIALITY NOTICE: The information in this message, and any attachment, is intended for the sole use of the individual and entity to whom it is addressed. This information may be privileged, confidential, and protected from disclosure. If you are not the intended recipient you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it, or its contents, is strictly prohibited. If you think that you have received this message in error please notify the sender and destroy all copies of this communication and any attachments. Thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6+webapps+log4j
Em 24/01/2013 17:08, Justin Rosenberg escreveu: You might try putting the log4j properties file (or xml) in a shared loader location. In catalina.properties add something like this: shared.loader=${catalina.base}/conf/properties and then put the properties file there. ~Justin -Original Message- From: Tiago Sousa [mailto:tiago-a-so...@ext.ptinovacao.pt] Sent: Thursday, January 24, 2013 10:01 AM To: users@tomcat.apache.org Subject: Tomcat6+webapps+log4j Hello to all. I have tomcat 6 using JULI for logging (logging.properties in conf dir) plus several webapps using its own log4j.properties. I need to centralized all the logs so i thought to put a global/shared log4j.properties in $CATALINA_BASE\lib so that tomcat and each webapp can be controlled through this file. The problem i'm facing is that no logs are produced. At this time i'm trying to configure just TOMCAT, no webapps, to log through log4j but still no logs are produced. I've folowed the tutorial in Apache logging webpage with the standard log4j.properties. No logs in $CATALINA_BASE\logs. Can you help me saying what mistakes i am doing in this basic configuration (tomcat and no apps)? Thanks. Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org CONFIDENTIALITY NOTICE: The information in this message, and any attachment, is intended for the sole use of the individual and entity to whom it is addressed. This information may be privileged, confidential, and protected from disclosure. If you are not the intended recipient you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it, or its contents, is strictly prohibited. If you think that you have received this message in error please notify the sender and destroy all copies of this communication and any attachments. Thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi. Thanks for your reply. I had already tried your suggestion with no results. As said in catalina.properties: If left as blank, the common loader will be used as Catalina's shared loader. which is the place where log4j.properties is. Thank you again. Tiago - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org