0 Replies Latest reply on Jan 2, 2007 6:58 PM by Laiwu Luo

    log4j and Jboss-4.0.5 GA

    Laiwu Luo Newbie

      I have a question on using log4j in JBoss-4.0.5 environment. I have "log4j.properties" file under my web application /WEB-INF/classes directory 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
      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 the entry in the log file does not correctly show the file name (Welcome.java) and its line number (see below):

      01/02/2007 16:32:52 EST INFO [Welcome] (Log4JLogger.java:94) forward to "Welcome.jsp"

      Is there any JBoss configuation I need do to make loj4j works as expected?

      Thanks,

      Laiwu