Uploaded image for project: 'JBoss Log Manager'
  1. JBoss Log Manager
  2. LOGMGR-152

Add server and process name & id fields to log record

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 2.1.0.Alpha1
    • None
    • core
    • None

      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.

            dlloyd@redhat.com David Lloyd
            dlloyd@redhat.com David Lloyd
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: