Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Repeated log messages log4j

 
srsrikkanth rajendran
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using log4j in my struts application.
The messages get repeated muliple to=imes.
I am not sure whats the problem. Kindly advise.

I instantiate my logger as
logger = Logger.getLogger("WSO");

my properties file is as follows:
# Set root logger level to DEBUG and its only appender to CONSOLE1.
log4j.rootCategory=DEBUG, CONSOLE1,ROLLING1

# CONSOLE1
log4j.appender.CONSOLE1=org.apache.log4j.ConsoleAppender

# CONSOLE1 uses TTCC (Time, Thread Category, Context) Layout
# Levels used to be called Categories in older versions of log4j.
log4j.appender.CONSOLE1.layout=org.apache.log4j.TTCCLayout

log4j.appender.ROLLING1=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLING1.File=wso.log
log4j.appender.ROLLING1.MaxFileSize=1000KB
log4j.appender.ROLLING1.MaxBackupIndex=3
log4j.appender.ROLLING1.layout=org.apache.log4j.TTCCLayout
 
Kashif Memon
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also having same problem, any suggestion?

I am working on struts portlet and deploying on IBM WebSphere Portal 5.1

Regards,
Kashif
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic