You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Lee P. Reilly" <lr...@lanl.gov> on 2005/08/12 19:27:25 UTC

Including the PID in the ConversionPattern?

Hi guys,

Can you tell me if there a way that I can use set the ConversionPattern 
in Log4J to include the PID of the currently executing thread? In our 
house-build logging code, we do:

 String[] cmd = { "/bin/bash", "-c", "echo $PPID" };
 Process p = Runtime.getRuntime().exec(cmd); // etc.

I see that the Perl implementation supports this, but can't find 
reference to it in the Java version. Does anyone have a quick hack?

Cheers,
 Lee

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