This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Logging " Watch "Logging " New topic
Author

Logging

ramesh kothakonda
Ranch Hand

Joined: Feb 14, 2006
Posts: 40
Hi,
I am using log4j for logging in my struts application.
I kept following lines in my log4j.properties file.
But i am getting the warning message in the console like

log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).

log4j:WARN Please initialize the log4j system properly.

please give me the solution




log4j.rootLogger=DEBUG, A1

log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.file=/com/myapp/struts/monitor.log
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=[%5p] %d{mm:ss} (%F:%M:%L)%n%m%n%n


The object oriented way of becoming "RICH" is by INHERITANCE<br />Whoever said money can't buy happiness, didn't know where to shop.
Jan Groth
Ranch Hand

Joined: Feb 03, 2004
Posts: 456
the configuration file itself cannot be found. you can either put it in the classpath, or name its location as a vm-argument, i think its

-Dlog4j.configuration=xxx

google is your friend ;-)

jan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logging
 
Similar Threads
how to consume a webservice using axis2
Log4j-DailyRollingFileAppender not woking with Websphere Application Server 6.1
Log4j - Compress Log Files
Log4j stopped working
Log4j in a web application