You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2016/05/02 23:06:13 UTC

[jira] [Commented] (LOG4J2-1377) Rfc5424Layout should allow for setting the process id instead of returning '-'

    [ https://issues.apache.org/jira/browse/LOG4J2-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15267504#comment-15267504 ] 

Gary Gregory commented on LOG4J2-1377:
--------------------------------------

Optionally using JMX (but not all environments like GAE) or JNA is an option... see http://stackoverflow.com/questions/35842/how-can-a-java-program-get-its-own-process-id
We could provide a util to do all of this and then you'd configure the layout with how you want to get the ID: JMX, JNA, or Java 9 through reflection. Ugh.

> Rfc5424Layout should allow for setting the process id instead of returning '-'
> ------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1377
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1377
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core, Layouts
>    Affects Versions: 2.5
>            Reporter: Mark Niggemann
>            Priority: Minor
>
> The Rfc424Layout provides no means whatsoever to have the process id returned in the proper location in the message. 
> This causes some concern with healthcare auditing and accountability since the expected norm is that healthcare audit trails are represented in the format specified by the ATNA profile of IHE IT Technical Framework. This calls out for representing the audit trail using an XML message format that is expressed as an RFC5424 Syslog. 
> Unfortunately, not providing the process id of the sender can be interpreted as a legal/regulatory non-conformance.
> It would be great if there were some means of setting this. Prior to Java 9, that could prove difficult, though the javax.management package could be used in some context to determine this though may not work under OSGi or even some contains. In Java 9, it is presumed the Process API could be safely utilized in all contexts.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org