Announcement Announcement Module
Collapse
No announcement yet.
Spring log4j output not appearing in any Tomcat 7 log file Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring log4j output not appearing in any Tomcat 7 log file

    I'm starting Tomcat 7 with CATALINA_HOME/bin/startup from the command line on a Windows 7 machine. A new command line window opens and all of the logging that Spring issues appears in the window. However, I don't see this logging in any of the usual log files in CATALINA_HOME/logs. I'm wondering if my log4j config is preventing and/or redirecting the Spring logging.

    Code:
    log4j.rootLogger=DEBUG, A1
    log4j.appender.A1=org.apache.log4j.ConsoleAppender
    log4j.appender.A1.layout=org.apache.log4j.PatternLayout
    log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
    
    # define a single log file for the application
    log4j.logger.AppLogFile=DEBUG,AppLogFile
    log4j.appender.AppLogFile=org.apache.log4j.RollingFileAppender
    log4j.appender.AppLogFile.layout=org.apache.log4j.PatternLayout
    log4j.appender.AppLogFile.layout.ConversionPattern=%-22d{dd/MMM/yyyy HH:mm:ss} - %m%n
    log4j.appender.AppLogFile.File=../logs/applicationLog.log
    The application logging appears both in the new window and the applications log file but the Spring output is only in the new window.

    Is my log4j config somehow overriding the Spring 7 log4j config?

    Thanks for any help or advice, bils
Working...
X