2 Replies Latest reply on Mar 31, 2014 1:09 PM by jamezp

    Customizing logging

    sandello

      Hi All.

       

      Our company created a small tools for logging based on log4j. The tools use a special class extends org.apache.log4j.spi.LoggingEvent for holding some logging information. And we can create a LogAppender which uses this information.

      The problem is that this scheme does not work with JBoss or Wildfly. JBoss uses its own class hierarchy for store logging information. And now we can't create specific log appender for saving our log events.

      Which way should be used for pass our own log event to log appender through jboss logging system?

        • 1. Re: Customizing logging
          wdfink

          You need to implement/extend java.util.logging.Handler and pack it into a module.

          And use the CustomHandler configuration in the logging subsystem

           

          Logging Configuration

          1 of 1 people found this helpful
          • 2. Re: Customizing logging
            jamezp

            It may depend on where you want to use your custom LoggingEvent and appender. If you're only concerned with using your custom log4j tools in your deployment(s) then you can follow the instructions to include your own version of log4j.

             

            If you're looking to configure the server to use your custom appenders, then it won't work. The server uses JBoss Log Manager to configure it's loggers and handlers.

             

            --

            James R. Perkins

            1 of 1 people found this helpful