Announcement Announcement Module
Collapse
No announcement yet.
disabling log4j output Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • disabling log4j output

    Hi,

    I'm having trouble getting rid of the countless DEBUG messages I get everytime I deploy my spring webapp.

    Here's my log4j.properties contents:

    Code:
    log4j.rootCategory=WARNING, stdout, logfile
    
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=%d %p &#91;%c&#93; - <%m>%n
    
    log4j.appender.logfile=org.apache.log4j.RollingFileAppender
    log4j.appender.logfile.File=C&#58;/tomcat5/logs/springapp.log
    log4j.appender.logfile.MaxFileSize=512KB
    # Keep three backup files
    log4j.appender.logfile.MaxBackupIndex=3
    log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
    #Pattern to output &#58; date priority &#91;category&#93; - <message>line_separator
    log4j.appender.logfile.layout.ConversionPattern=%d %p &#91;%c&#93; - <%m>%n
    Shouldn't it be enough to cut the DEBUG messages and leave only WARNING and above messages?

    What am I missing here?

    bernard

  • #2
    Are you sure that Log4j is picking up that particular properties file? Is there anything else in your environment that may be configuring Log4j?

    Comment


    • #3
      yes. proof is: when the log4j.properties is absent, log4j complains with the well-known message (...please configure the log4j system properly)

      bernard

      Comment


      • #4
        got it: it's not WARNING, but WARN, DARN!

        Comment

        Working...
        X