2 Replies Latest reply on Feb 9, 2005 5:36 PM by Scott Jourdan

    new log4j appendar logs all

    Scott Jourdan Newbie

      I revcently added a new appender to the log4j.xml so I could log messages from my app to this file. However, along with the messages I log by "Logger myLog = Logger.getLogger("myLog")" I get everyting else that the server spits out as well. My log file is basicaly a copy of the server.log. Below is how I setup my appender - does anyone know how I can log just the elements that by using myLog.info("write only me");

      Thanks,
      SJ

      -------- APPENDER -------








        • 1. Re: new log4j appendar logs all
          Scott Jourdan Newbie

          Dont think it likes the quotes, let try again:

          appender name="SRSLog" class="org.apache.log4j.FileAppender"
          errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"
          param name="Append" value="flase"
          param name="File" value="${jboss.server.home.dir}/log/SRS.log"
          layout class="org.apache.log4j.PatternLayout"
          param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/
          layout
          appender

          • 2. Re: new log4j appendar logs all
            Scott Jourdan Newbie

            Ok, I solved the problem. Going off the example on the Logging Wiki page, I put in a filter for my ear file. This worked.

            If anyone one is still looking at this topic I have another question, can I define an appender in my package and have it deployed when I deploy? So each package can add its own appendar?

            Thanks,
            SJ