1 Reply Latest reply on Feb 20, 2014 1:32 PM by klape

    Wildfly-8 Custom formatter documentation and example?

    toddler

      Hi  I am looking for some documentation and an example use/implementation of the new Wildfly 8 custom formatter,

      Can someone please point me in the right direction? Would like to see the logging configuration and the source

      code for a simple custom formatter (or details on what needs to be implemented/extended/etc.).

       

      What I want to do is to "extend" the existing formatter and add new formatter options (e.g. %h for "host") and

      modify existing formats.

       

      Need to migrate/port a EAP 5 log4j custom "layout" class to use custom formatter...(JBoss logging)


      In EAP 5 log4j, did this by specifying the "class=" within the "layout" of an appender.

      e.g

         <appender name="FILE" class="com.myorg.MySpecialAppender">

           ...

            <layout class="com.myorg.logging.MyPatternLayout">

              <param name="ConversionPattern" value="%d{yyyy.MM.dd HH:mm:ss} %h %c %m%n"/>

            </layout>

          </appender>

       

      The com.myorg.logging.MyPatternLayout would extend "PatternLayout"..

      e.g

      public class MyPatternLayout extends PatternLayout

      {

      ...

      }

       

      Thanks