You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Pedro Salazar <pe...@ptinovacao.pt> on 2002/12/13 11:06:47 UTC

WAR (tomcat) + LOG4J : wrong configuration?

Greetings, 

I would like to configure log4j to log information to a specific file.
Until now, after I created and deployed the log4j.properties inside
WEB-INF/classes/, I only managed to stop the boring message:

log4j:WARN No appenders could be found for logger
(PT.ptinovacao.ngincare.service.NGINCareImpl).
log4j:WARN Please initialize the log4j system properly.

Now, I have my web log in catalina.out when I desire to output it for a
specific file, and all the other applications to the catalina.out.
Furthermore, I configure to DEBUG level, but it stills output only to
INFO level, which lets me think that may log4j.properties is detected
but isn't well configured!

my log4j.properties in WEB-INF/classes/: 
" 
log4j.rootLogger=DEBUG,NGIN 
log4j.category.PT.ptinovacao.ngincare=DEBUG,NGIN 
#log4j.appender.NGIN=org.apache.log4j.ConsoleAppender 
log4j.appender.NGIN=org.apache.log4j.RollingFileAppender 
log4j.appender.NGIN.File=ngincare.log 
log4j.appender.NGIN.MaxFileSize=1024KB 
log4j.appender.NGIN.layout=org.apache.log4j.PatternLayout 
log4j.appender.NGIN.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
" 

BTW, I have also the debug level messages from tomcat directed to a
specific file to see if the deployment and other specificness of tomcat
are running ok, and this is working as expected:

<Context docBase="ngincare.war" debug="4" reloadable="true"
        path="ngincare">
        <Logger
            className="org.apache.catalina.logger.FileLogger"
            prefix="localhost_ngincare_log."
            suffix=".txt"
            timestamp="true" />
</Context>

Now, I want another log file for log of my business web application!!
So, what is wrong in log4j.properties?

1) Why isn't creating the log file?
2) Why isn't logging in debug but in info level?

thanks, 
Pedro Salazar 
-- 
pedro salazar (@work) <pe...@ptinovacao.pt>
key id: D803BC61


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>