1 Reply Latest reply on Jun 26, 2012 10:49 PM by b.eckenfels

    log manager formatter: system properties access

    b.eckenfels

      Hello,

       

      looking at the logmanager formatter code I dont see a way to format system properties into the log-messages. I would like to have (physical)hostname, (host-manager)logicalhostname, processID (PID) and server name in some of the logfiles. Since those are global properties I cant put them in the MDC/NDC. I wonder if there is a way that the configuration loader replaces them when parsing the domain.xml subsystems?

       

      Currently I have a custom loghandler, but I would like to get rid of it (especially since it needs to parse the formatted strings).

       

      One option would be to add custom formatter steps, is there a way to do that (based on a pattern add/change specific steps).

       

      Greetings

      Bernd

        • 1. Re: log manager formatter: system properties access
          b.eckenfels

          For the boot logger system properties (with default) are found and replaced, but not for the logmanager subsystem in domain.xml.

           

          I also found some properties which represent the information I am looking about:

           

          ${jboss.node.name:SERVER/HOST}/${jboss.host.name:LOCALHOST}

           

          however it looks like they are set after the boot logger is configured (and therefore only the default value is used).