Put the hostname somewhere at app start into MDC:
MDC.put( "hostname", myHostname );
The conversionPattern can resolve MDC values by using the switch %X{<ID>}. The
ID in my example is "hostname" (without quotes).
Heri
> -----Original Message-----
> From: Hans Schwaebli [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 04, 2007 3:56 PM
> To: [email protected]
> Subject: [SPAM (Bayesain Analysis)] - How to always log the
> host name? -
> Bayesian Filter detected spam
>
>
> How can I configure the log4j logging to add the hostname
> information into the logging output?
>
> Most naturally would be to find a conversion character for
> the hostname in the PatternLayout. But there is none.
>
>
> ---------------------------------
> Building a website is a piece of cake.
> Yahoo! Small Business gives you all the tools to get online.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]