jQuery in Action, 2nd edition*
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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
 
wood burning stoves
 
subject: log4j not working in Weblogic 9.2