0 Replies Latest reply on Jan 2, 2007 3:01 PM by Laiwu Luo

    log4j and Jboss-4.0.5 GA

    Laiwu Luo Newbie

      I start to use JBoss and have a question on using log4j in JBoss-4.0.5 environment. In my web application /WEB-INF/class foler, I have "log4j.properties" file as follows:

      # Set root logger level to error, and specify a file appender
      log4j.rootLogger=error, File

      ###### File appender definition #######
      log4j.appender.File=org.apache.log4j.RollingFileAppender
      log4j.appender.File.File=c:/logs/myApp.log
      log4j.appender.File.MaxFileSize=50MB
      log4j.appender.File.MaxBackupIndex=1
      log4j.appender.File.layout=org.apache.log4j.PatternLayout
      # Pattern to output the caller's file name and line number.
      log4j.appender.File.layout.ConversionPattern=%d{MM/dd/yyyy HH:mm:ss z} %-5p [%c(1)] (%F:%L) %m%n

      log4j.logger.com.covisint.hie=DEBUG

      But in the log, the message are shown as follows:

      01/02/2007 14:29:31 EST DEBUG [Welcome] (Log4JLogger.java:84) forward to "Welcome.jsp"

      The file name (Welcome.java) and its line number are not being shown. correctly. Are there some configuration steps I have missed?

      Thanks,

      Laiwu Luo