logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Stauffer <stauffer.ja...@gmail.com>
Subject Re: unable to setup log4j for tomcat
Date Wed, 05 Oct 2005 13:44:09 GMT
Add -Dlog4j.debug to your Tomcat parameters to see if log4j is finding
your config file.  (Look in std. out)

On 10/5/05, John Cherouvim <jc@eworx.gr> wrote:
> Hello
>
> I'm pretty new with log4j so excuse me if my question is very basic.
>
> I have managed to setup log4j and call it from a class which I run
> directly from Netbeans. I have configured log4j using a log4j.properties
> in WEB-INF\classes\properties which is contained in the classpath in my
> project
> This one contains:
> log4j.rootLogger=debug, stdout, R
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=example.log
> log4j.appender.R.MaxFileSize=100KB
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
>
> Which works great. In my project's folder I can now see a file called
> 'example.log' where I get all my logs.
>
> Now if I run my application from within tomcat no file is created and I
> cannot find the logging that I did when the application run.
> I also tried to do
> log4j.appender.R.File=/usr/local/tomcat5/webapps/test-john-7/example.log
> which is a direct path of the file on the server.
>
> What did miss?
> Regards,
> Ioannis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message