1 Reply Latest reply on Dec 14, 2011 10:12 AM by wdfink

    how to prevent jboss from logging logs into my application log file

    kleyonandy

      Am using log4j to log the contents of my application in the hard drive(not inside jboss logs server).

      But the log file contains all the jboss start up messages along with my application log messages, but i want only my application logs to be there in my log file and jboss logs in logs/server.log file.

       

      Can i achive this??

       

      The logger code and configuration which i have used in my application is:

       

      Code:

      ----------------------

      private static  Logger log=Logger.getRootLogger();

          

           public static void configure(String configFileName)

           {

               PropertyConfigurator.configure(configFileName);        

           }

       

       

      Configuration file contents:

      -----------------------------------------------

       

      log4j.rootLogger = DEBUG, rollingFile

      log4j.appender.rollingFile=org.apache.log4j.RollingFileAppender

      log4j.appender.rollingFile.File=D:/logs/wslog.log

      log4j.appender.rollingFile.MaxFileSize=1MB

      log4j.appender.rollingFile.MaxBackupIndex=100

      log4j.appender.rollingFile.layout = org.apache.log4j.PatternLayout

      log4j.appender.rollingFile.layout.ConversionPattern= %-5p %d - %m%n