Can you submit a Jira issue with that patch? I wasn't aware of that method. I suspect it might have to be called via reflection and still use '-' if it fails. I recall that recently a change like that had to be made to support google app engine.
Ralph > On Oct 8, 2013, at 11:02 PM, Oliver Flege <[email protected]> wrote: > > Hi, > > is there a particular reason why RFC5424Layout#getProcId() always returns > an undefined value (i.e., "-")? > > On most VMs, > java.lang.management.ManagementFactory.getRuntimeMXBean().getName() > returns <pid>@<host>, so maybe the code could be changed like this: > > private static final String PROCESS_ID; > static { > String name = ManagementFactory.getRuntimeMXBean().getName(); > PROCESS_ID = name.matches("\\d{1,5}@.+") ? name.substring(0, > name.indexOf('@')) : "-"; > } > > protected String getProcId() { > return PROCESS_ID; > } > > > Adding a real PID would allow to check for program restarts. > > Regards, > Oliver > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
