[jboss-jira] [JBoss JIRA] (LOGMGR-152) Add server and process name & id fields to log record

David Lloyd (JIRA) issues at jboss.org
Wed Apr 19 10:15:00 EDT 2017


David Lloyd created LOGMGR-152:
----------------------------------

             Summary: Add server and process name & id fields to log record
                 Key: LOGMGR-152
                 URL: https://issues.jboss.org/browse/LOGMGR-152
             Project: JBoss Log Manager
          Issue Type: Enhancement
          Components: core
            Reporter: David Lloyd
            Priority: Minor


In order to support aggregation of log records with some awareness of origin, we would need server name and process name and id arguments on ExtLogRecord.

The server name is a string field which contains the host name of the log record producer.  The default value for this field would be {{org.wildfly.common.net.HostName#getHostName()}}.  If the field is not present on deserialize, "<unknown>" could be used.

The process name is a string field which contains the name of the process.  The default value for this field could be extracted from the first part of the {{sun.java.command}} system property.  It would be configurable via system property, e.g. {{jboss.logmanager.process.name}} or something.  If the field is not present on deserialize, "<unknown>" could be used.

The process ID field is a long field that contains the ID of the process.  The value of this field should be set from ProcessHandle.current().pid() on Java 9.  On Java 8 and earlier, you can use {{ManagementFactory.getRuntimeMXBean().getName()}} and parse the numeric data up to the {{@}} symbol.  If the data does not parse, or the field is not present on deserialize, -1L should be used to indicate an unknown PID.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list