You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Björn Agel <bj...@agel-rosen.de> on 2011/06/21 12:23:44 UTC
Tomcat 7 Logging Log4J - [INFO] org.apache.catalina.core.ContainerBase
Hi there,
I am using Log4j with the following log4j.properties for the Tomcat:
/log4j.rootLogger=INFO, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/tomcat.log
log4j.appender.R.encoding=UTF-8
log4j.appender.R.MaxFileSize=2MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.R.append=true
log4j.logger.org.apache.jasper.compiler.TldLocationsCache=ERROR
log4j.logger.org.apache.tomcat.util.http.Parameters=ERROR
log4j.logger.org.apache.struts.util.MessageResources=ERROR
//
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[www.agel-rosen.de].[/]=INFO/
//
I want to get rid of the following WARN message which appears every minute:
/2011-06-21 11:46:00,647 ["ajp-apr-8042"-exec-9] INFO
org.apache.catalina.core.ContainerBase.[Catalina].[www.agel-rosen.de].[/] -
[WARN] PropertyMessageResources - Resource ... Not Found. /
As you can see I tried to disable appearing that message with
"log4j.logger.org.apache.struts.util.MessageResources=ERROR" but it
doesn't ...
Anyone can help me further?
with best regards,
Björn
Tomcat Administration Training
Posted by "Garg, Saman" <Sa...@intuit.com>.
Could somebody please point me to an institute which conducts Tomcat
administration training in INDIA (Bangalore)?
Thanks for your help.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 7 Logging Log4J - [INFO] org.apache.catalina.core.ContainerBase
Posted by Björn Agel <bj...@agel-rosen.de>.
Am 21.06.2011 15:33, schrieb Konstantin Kolinko:
> 2011/6/21 Björn Agel<bj...@agel-rosen.de>:
>> Am 21.06.2011 14:59, schrieb Konstantin Kolinko:
>>> 2011/6/21 Björn Agel<bj...@agel-rosen.de>:
>>>> Hmmmm,
>>>>
>>>> In the documentation of Struts 1.3.10 it says they are using
>>>> commons-logging
>>>> API.
>>>> I configured Tomcat to use log4j, so I don't know where the calls to
>>>> ServletContext.log() should come from.
>>>> Any ideas?
>>> Search for the "PropertyMessageResources" string in the source code,
>>> or in the compiled class files (the string in classes is in UTF-8, so
>>> it will be visible as is). The message should have come from
>>> somewhere.
>>>
>>> There is no "PropertyMessageResources" string in the Tomcat 7.0
>>> sources. I do not know what version you are actually using.
>>>
>>>
>> Here is the source code and the code line:
>> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.struts/struts-core/1.3.10/org/apache/struts/util/PropertyMessageResources.java#352
>>
>> They are using commons-logging ...
>> I configured Tomcat 7 for using log4j as described here:
>> http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j
>>
>> But it seems to be that my web application doesn't call log4j.
>> I thought without any special configuration, log4j would be used as the
>> default logger or am I wrong?
> It might be an effect of swallowOutput property being set on Context.
> [1] Though you should not use it if you have a logging framework.
>
> [1]: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Yeah,
that's the solution!
The swallowOutput property was configured ... thank you! :)
best regards,
Björn
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 7 Logging Log4J - [INFO] org.apache.catalina.core.ContainerBase
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/6/21 Björn Agel <bj...@agel-rosen.de>:
> Am 21.06.2011 14:59, schrieb Konstantin Kolinko:
>>
>> 2011/6/21 Björn Agel<bj...@agel-rosen.de>:
>>>
>>> Hmmmm,
>>>
>>> In the documentation of Struts 1.3.10 it says they are using
>>> commons-logging
>>> API.
>>> I configured Tomcat to use log4j, so I don't know where the calls to
>>> ServletContext.log() should come from.
>>> Any ideas?
>>
>> Search for the "PropertyMessageResources" string in the source code,
>> or in the compiled class files (the string in classes is in UTF-8, so
>> it will be visible as is). The message should have come from
>> somewhere.
>>
>> There is no "PropertyMessageResources" string in the Tomcat 7.0
>> sources. I do not know what version you are actually using.
>>
>>
>
> Here is the source code and the code line:
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.struts/struts-core/1.3.10/org/apache/struts/util/PropertyMessageResources.java#352
>
> They are using commons-logging ...
> I configured Tomcat 7 for using log4j as described here:
> http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j
>
> But it seems to be that my web application doesn't call log4j.
> I thought without any special configuration, log4j would be used as the
> default logger or am I wrong?
It might be an effect of swallowOutput property being set on Context.
[1] Though you should not use it if you have a logging framework.
[1]: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 7 Logging Log4J - [INFO] org.apache.catalina.core.ContainerBase
Posted by Björn Agel <bj...@agel-rosen.de>.
Am 21.06.2011 14:59, schrieb Konstantin Kolinko:
> 2011/6/21 Björn Agel<bj...@agel-rosen.de>:
>> Hmmmm,
>>
>> In the documentation of Struts 1.3.10 it says they are using commons-logging
>> API.
>> I configured Tomcat to use log4j, so I don't know where the calls to
>> ServletContext.log() should come from.
>> Any ideas?
> Search for the "PropertyMessageResources" string in the source code,
> or in the compiled class files (the string in classes is in UTF-8, so
> it will be visible as is). The message should have come from
> somewhere.
>
> There is no "PropertyMessageResources" string in the Tomcat 7.0
> sources. I do not know what version you are actually using.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Here is the source code and the code line:
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.struts/struts-core/1.3.10/org/apache/struts/util/PropertyMessageResources.java#352
They are using commons-logging ...
I configured Tomcat 7 for using log4j as described here:
http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j
But it seems to be that my web application doesn't call log4j.
I thought without any special configuration, log4j would be used as the
default logger or am I wrong?
best regards,
Björn
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 7 Logging Log4J - [INFO] org.apache.catalina.core.ContainerBase
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/6/21 Björn Agel <bj...@agel-rosen.de>:
> Hmmmm,
>
> In the documentation of Struts 1.3.10 it says they are using commons-logging
> API.
> I configured Tomcat to use log4j, so I don't know where the calls to
> ServletContext.log() should come from.
> Any ideas?
Search for the "PropertyMessageResources" string in the source code,
or in the compiled class files (the string in classes is in UTF-8, so
it will be visible as is). The message should have come from
somewhere.
There is no "PropertyMessageResources" string in the Tomcat 7.0
sources. I do not know what version you are actually using.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 7 Logging Log4J - [INFO] org.apache.catalina.core.ContainerBase
Posted by Björn Agel <bj...@agel-rosen.de>.
Hmmmm,
In the documentation of Struts 1.3.10 it says they are using
commons-logging API.
I configured Tomcat to use log4j, so I don't know where the calls to
ServletContext.log() should come from.
Any ideas?
with best regards,
Björn
Am 21.06.2011 12:31, schrieb Konstantin Kolinko:
> 2011/6/21 Björn Agel<bj...@agel-rosen.de>:
>> Hi there,
>>
>> I am using Log4j with the following log4j.properties for the Tomcat:
>>
>> /log4j.rootLogger=INFO, R
>>
>> log4j.appender.R=org.apache.log4j.RollingFileAppender
>> log4j.appender.R.File=${catalina.home}/logs/tomcat.log
>> log4j.appender.R.encoding=UTF-8
>> log4j.appender.R.MaxFileSize=2MB
>> log4j.appender.R.MaxBackupIndex=10
>> log4j.appender.R.layout=org.apache.log4j.PatternLayout
>> log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
>> log4j.appender.R.append=true
>>
>> log4j.logger.org.apache.jasper.compiler.TldLocationsCache=ERROR
>> log4j.logger.org.apache.tomcat.util.http.Parameters=ERROR
>> log4j.logger.org.apache.struts.util.MessageResources=ERROR
>>
>> //
>> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[www.agel-rosen.de].[/]=INFO/
>> //
>>
>> I want to get rid of the following WARN message which appears every minute:
>>
>> /2011-06-21 11:46:00,647 ["ajp-apr-8042"-exec-9] INFO
>> org.apache.catalina.core.ContainerBase.[Catalina].[www.agel-rosen.de].[/] -
>> [WARN] PropertyMessageResources - Resource ... Not Found. /
>>
>>
>> As you can see I tried to disable appearing that message with
>> "log4j.logger.org.apache.struts.util.MessageResources=ERROR" but it doesn't
> The logger name in the message is
> "org.apache.catalina.core.ContainerBase.[Catalina].[www.agel-rosen.de].[/]"
>
> Whatever logs the message does call ServletContext.log() instead of
> using a logging library. See [1].
>
> [1]: http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Servlets_logging_API
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 7 Logging Log4J - [INFO] org.apache.catalina.core.ContainerBase
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/6/21 Björn Agel <bj...@agel-rosen.de>:
> Hi there,
>
> I am using Log4j with the following log4j.properties for the Tomcat:
>
> /log4j.rootLogger=INFO, R
>
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=${catalina.home}/logs/tomcat.log
> log4j.appender.R.encoding=UTF-8
> log4j.appender.R.MaxFileSize=2MB
> log4j.appender.R.MaxBackupIndex=10
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
> log4j.appender.R.append=true
>
> log4j.logger.org.apache.jasper.compiler.TldLocationsCache=ERROR
> log4j.logger.org.apache.tomcat.util.http.Parameters=ERROR
> log4j.logger.org.apache.struts.util.MessageResources=ERROR
>
> //
> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[www.agel-rosen.de].[/]=INFO/
> //
>
> I want to get rid of the following WARN message which appears every minute:
>
> /2011-06-21 11:46:00,647 ["ajp-apr-8042"-exec-9] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[www.agel-rosen.de].[/] -
> [WARN] PropertyMessageResources - Resource ... Not Found. /
>
>
> As you can see I tried to disable appearing that message with
> "log4j.logger.org.apache.struts.util.MessageResources=ERROR" but it doesn't
The logger name in the message is
"org.apache.catalina.core.ContainerBase.[Catalina].[www.agel-rosen.de].[/]"
Whatever logs the message does call ServletContext.log() instead of
using a logging library. See [1].
[1]: http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Servlets_logging_API
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org