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

  • log4j problems

    Hi.
    I have a problem using log4j. I would like to stop logging sping framework INFO, and start logging only messages from my web application.
    I created log4j.properties, and added log4jConfigLocation and Log4jConfigListener in web.xml.
    log4j.properties:
    ###############################################
    log4j.appender.rolling=org.apache.log4j.RollingFil eAppender
    log4j.appender.rolling.File=${app.root}/app.log
    log4j.appender.rolling.layout=org.apache.log4j.Pat ternLayout
    log4j.appender.rolling.layout.ConversionPattern=%d %5p [%t] (%F:%L) - %m%n

    log4j.logger.com.mypackage1=INFO,rolling
    log4j.logger.com.mypackage2=INFO,rolling
    log4j.logger.org.springframework=WARN,rolling
    ###############################################

    app.root has been added to web.xml using webAppRootKey.
    I'm testing application on tomcat 5.
    When i start tomcate, app.log file is created, and in catalina.out i get spring INFO logging.
    After sending request to my web application, log stays empty.

    What is the problem?
    Can anyone help?
    Thanx.
    Alan

  • #2
    See the logging documentation from Tomcat: http://tomcat.apache.org/tomcat-5.5-doc/logging.html.

    Comment

    Working...
    X