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 BEA/Weblogic and the fly likes log4j not working in Weblogic 9.2 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 » Products » BEA/Weblogic
Bookmark "log4j not working in Weblogic 9.2" Watch "log4j not working in Weblogic 9.2" New topic
Author

log4j not working in Weblogic 9.2

Venkata Sirish
Ranch Hand

Joined: Apr 09, 2007
Posts: 112
Hi ranchers,

I have deployed a struts application on Weblogic 9.2 server. I'am using log4j.properties file placed in the application class path(under WEB-INF/classes) folder.

Here is a snippet of content in log4j.properties.

#### This appender writes all log statements with level >= WARN
log4j.appender.warn=org.apache.log4j.RollingFileAppender
log4j.appender.warn.Threshold=WARN
log4j.appender.warn.File=c:/logs/log_warn.log
log4j.appender.warn.layout=org.apache.log4j.PatternLayout
log4j.appender.warn.layout.ConversionPattern=[%d{ISO8601}] %5p [%t] (%M:%F:%L) %x: - %m%n
#log4j.appender.warn.DatePattern='.'yyyy-MM-dd
# Control the maximum log file size
log4j.appender.warn.MaxFileSize=5000KB
# Archive log files (one backup file here)
log4j.appender.warn.MaxBackupIndex=100

----------------

The above approach works fine in tomcat server, but it is not working on weblogic server.


I mean log4j is not writing the loggers into 'log_warn.log' file.
Will weblogic server writes to any other logger file instead.


Thanks for your time in advance,
Venkat
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
I would check WL logs
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: log4j not working in Weblogic 9.2
 
Similar Threads
log4j struts weblogic 9.2
Problem configuring Hibernate and JPA in Eclipse
log4j & log4j.xml
Need help with log4j logging tool to log into database
Using JDBCAppender for older versions of JDK