Check the API for the MDC class. 
http://jdocs.com/log4j/1.2.8/api/index.html  Also check the
PatternLayout class in the API to see how to print MDC values.
Short example:
Call this in codeo: MDC.put("PID", getPid());
Add this to the pattern: %X{PID}

On Tue, 22 Mar 2005 17:32:08 -0500, Elihu Smails <[EMAIL PROTECTED]> wrote:
> Could you elaborate on this more, or provide URL's.
> 
> Thank you.
> 
> 
> On Tue, 22 Mar 2005 07:08:42 -0600, James Stauffer
> <[EMAIL PROTECTED]> wrote:
> > Add the PID to MDC.
> >
> > On Mon, 21 Mar 2005 22:50:20 -0500, Elihu Smails <[EMAIL PROTECTED]> wrote:
> > > I want to write a layout that will be able to support PID for my logs.
> > >  My java program stores its process ID file in /var/run, and I want to
> > > be able to place this process ID in each of my logs.  Could someone
> > > give me some guidance as to how to extend the functionality of the
> > > PatternLayout class in order to support this.


-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to