0 Replies Latest reply on Oct 10, 2010 12:08 PM by berndwe

    Custom pattern-formatter in JBoss AS 6 M5 logging?

    berndwe

      Hi!

       

      We try to migrate from JBoss 4.x to 6 M5. In the project we use a custom pattern formatter for our (log4j) logging.

       

      In JBoss 4.x we could configure this via the log4j configuration like this:

       

      <appender ...>

            <layout class="org.MyLayout">

              <param name="MyParam" value="somevalue"/>

             ...

       

      But how we can do this in JBoss6?

      Ok.. we could use our old implementation via log4j (which is still functional in jboss6, we know).

      But..... this is boring.

       

      The only info we found about that is this setting in "logging.properties":

      formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter

       

      Our first thought was to replace this value by some project specific class.

       

      But this property file is part of the internal jboss jars and - if I am correct - this property is only used during kernel boot and can't be reconfigured by deployments. We could patch this in our jboss installation, but ... to do this inside the deployed application would be the better way.

       

      Perhaps via "jboss-logging.xml"?

       

      This there any way to do this?

      Or perhaps some not-yet-finished-feature in the new logging api that we can use in future?

      (which indeed needs "some wiki" , especially "jboss-logging.xml").

       

       

      Regards,

      Bernd