• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

Log4j help needed

I have a appln,that uses JCL on top of log4j...but the logs are still goin to the command prompt.here is my log4j.properties that i have in my classpath too:


#log4j.rootCategory=ALL, FILE_APPENDER, CONSOLE_APPENDER
#log4j.rootCategory=ALL, FILE_APPENDER
log4j.rootCategory=ALL, CONSOLE_APPENDER

log4j.logger.com.xyz=INFO
log4j.logger.org.apache=INFO
log4j.logger.httpclient.wire=INFO

log4j.appender.FILE_APPENDER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FILE_APPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE_APPENDER.layout.ConversionPattern=%d %-5p %m\t@%c%n
log4j.appender.FILE_APPENDER.Threshold=ALL
log4j.appender.FILE_APPENDER.DatePattern=.yyyy-MM-dd
log4j.appender.FILE_APPENDER.File=C:/client.log

log4j.appender.CONSOLE_APPENDER=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE_APPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE_APPENDER.layout.ConversionPattern=%d %p %m%n
log4j.appender.CONSOLE_APPENDER.Threshold=ERROR

Please help..thanks
0
harmeek_80
Asked:
harmeek_80
  • 2
1 Solution
 
CEHJCommented:
Try changing

>>
#log4j.rootCategory=ALL, FILE_APPENDER
log4j.rootCategory=ALL, CONSOLE_APPENDER
>>

to


log4j.rootCategory=ALL, FILE_APPENDER
#log4j.rootCategory=ALL, CONSOLE_APPENDER
0
 
CEHJCommented:
:-)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now