You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by JS Portal Support <su...@jsportal.com> on 2006/06/24 11:37:11 UTC

log4j warning: Please initialize the log4j system properly

Hi,

Just upgraded to Tomcat 5.5. In order to see what's happening at the context
level I need to see the internal logging of Tomcat. My logs are not working.

[CATALINA_HOME]/logs/stdout.log:

log4j:WARN No appenders could be found for logger
(org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.

[CATALINA_HOME]/logs/stderr.log:

log4j:WARN No appenders could be found for logger
(org.apache.catalina.startup.Embedded).
log4j:WARN Please initialize the log4j system properly.

Can anyone point me to a direction? I have no clue what is wrong, and all
the posts I have found all suggest to place the log4j.properties in the
common/classes dir. I have done this and it is not working.

[CATALINA_HOME]/common/classes/log4j.properties:

log4j.rootLogger=ERROR, R 
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=C:\Program Files\Apache Software Foundation\Tomcat
5.5\logs\tomcat.log 
log4j.appender.R.MaxFileSize=10MB 
log4j.appender.R.MaxBackupIndex=10 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.org.apache.catalina=DEBUG, R

I hope someone has a clue. Best regrads,
Joost


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: log4j warning: Please initialize the log4j system properly

Posted by David Smith <dn...@cornell.edu>.
[CATALINA_HOME]/common/classes/log4j.properties:

log4j.rootLogger=ERROR, R 
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=C:\Program Files\Apache Software Foundation\Tomcat
5.5\logs\tomcat.log 
log4j.appender.R.MaxFileSize=10MB 
log4j.appender.R.MaxBackupIndex=10 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.org.apache.catalina=DEBUG, R



You might want to drop the space after the comma in log4j.rootLogger and 
log4j.logger.org.apache.catalina
example: log4j.rootLogger=ERROR,R

Also '\' is an escape character, so you'll want to double up them to get 
a \ in the file path in log4j.appender.R.File.
example: log4j.appender.R.File=C:\\Program Files\\Apache Software 
Foundation\\Tomcat\\5.5\\logs\\tomcat.log


--David


JS Portal Support wrote:

>Hi,
>
>Just upgraded to Tomcat 5.5. In order to see what's happening at the context
>level I need to see the internal logging of Tomcat. My logs are not working.
>
>[CATALINA_HOME]/logs/stdout.log:
>
>log4j:WARN No appenders could be found for logger
>(org.apache.catalina.startup.TldConfig).
>log4j:WARN Please initialize the log4j system properly.
>
>[CATALINA_HOME]/logs/stderr.log:
>
>log4j:WARN No appenders could be found for logger
>(org.apache.catalina.startup.Embedded).
>log4j:WARN Please initialize the log4j system properly.
>
>Can anyone point me to a direction? I have no clue what is wrong, and all
>the posts I have found all suggest to place the log4j.properties in the
>common/classes dir. I have done this and it is not working.
>
>[CATALINA_HOME]/common/classes/log4j.properties:
>
>log4j.rootLogger=ERROR, R 
>log4j.appender.R=org.apache.log4j.RollingFileAppender 
>log4j.appender.R.File=C:\Program Files\Apache Software Foundation\Tomcat
>5.5\logs\tomcat.log 
>log4j.appender.R.MaxFileSize=10MB 
>log4j.appender.R.MaxBackupIndex=10 
>log4j.appender.R.layout=org.apache.log4j.PatternLayout 
>log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
>log4j.logger.org.apache.catalina=DEBUG, R
>
>I hope someone has a clue. Best regrads,
>Joost
>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: log4j warning: Please initialize the log4j system properly

Posted by Velpi <ve...@industria.be>.
> Can anyone point me to a direction? I have no clue what is wrong, and all
> the posts I have found all suggest to place the log4j.properties in the
> common/classes dir. I have done this and it is not working.
It seems log4j is working, but the log4j config isn't working properly for some 
reason. I think this line is causing some problems for you:
log4j.logger.org.apache.catalina=DEBUG, R
Don't see why actually...

> [CATALINA_HOME]/common/classes/log4j.properties:
> 
> log4j.rootLogger=ERROR, R 
> log4j.appender.R=org.apache.log4j.RollingFileAppender 
> log4j.appender.R.File=C:\Program Files\Apache Software Foundation\Tomcat
> 5.5\logs\tomcat.log 
> log4j.appender.R.MaxFileSize=10MB 
> log4j.appender.R.MaxBackupIndex=10 
> log4j.appender.R.layout=org.apache.log4j.PatternLayout 
> log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
> log4j.logger.org.apache.catalina=DEBUG, R

Maybe you should try putting the appender stuff at the bottom, and the loggger 
things on top. Also, you don't need to repeat the R. I would try this config once:

log4j.rootLogger=ERROR, R
log4j.logger.org.apache.catalina=DEBUG

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:\Program Files\Apache Software Foundation\Tomcat 
5.5\logs\tomcat.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n



--Velpi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: log4j warning: Please initialize the log4j system properly

Posted by Pid <p...@pidster.com>.

JS Portal Support wrote:
> Hi,
> 
> Just upgraded to Tomcat 5.5. In order to see what's happening at the context
> level I need to see the internal logging of Tomcat. 

Isn't this a different problem to the one below?
(Assuming you can get your logging working:)

<Context swallowOutput="true" ...>

Will direct all your context log messages to whichever logger is
configured in your application.


> My logs are not working.

5.5 log config is subtly different to previous versions.  Read the docs
at http://tomcat.apache.org/tomcat-5.5-doc/logging.html.  Unless you've
substantially changed the config, you shouldn't get the message below.

> [CATALINA_HOME]/logs/stdout.log:
> 
> log4j:WARN No appenders could be found for logger
> (org.apache.catalina.startup.TldConfig).
> log4j:WARN Please initialize the log4j system properly.
> 
> [CATALINA_HOME]/logs/stderr.log:
> 
> log4j:WARN No appenders could be found for logger
> (org.apache.catalina.startup.Embedded).
> log4j:WARN Please initialize the log4j system properly.
> 
> Can anyone point me to a direction? I have no clue what is wrong, and all
> the posts I have found all suggest to place the log4j.properties in the
> common/classes dir. I have done this and it is not working.
> 
> [CATALINA_HOME]/common/classes/log4j.properties:
> 
> log4j.rootLogger=ERROR, R 
> log4j.appender.R=org.apache.log4j.RollingFileAppender 
> log4j.appender.R.File=C:\Program Files\Apache Software Foundation\Tomcat
> 5.5\logs\tomcat.log 
> log4j.appender.R.MaxFileSize=10MB 
> log4j.appender.R.MaxBackupIndex=10 
> log4j.appender.R.layout=org.apache.log4j.PatternLayout 
> log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
> log4j.logger.org.apache.catalina=DEBUG, R
> 
> I hope someone has a clue. Best regrads,
> Joost
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org