Re: How to always log the host name?

2007-07-25 Thread ben short

Sorry scrap that request I have found the info now.

http://www.onjava.com/pub/a/onjava/2002/08/07/log4j.html?page=3

On 7/25/07, ben short <[EMAIL PROTECTED]> wrote:

James,

Could you elaborate about the MDC value please. What is it, how do i set it?

Regards

Ben

On 7/5/07, James Stauffer <[EMAIL PROTECTED]> wrote:
> I had added the hostname as an MDC value at application startup to achieve 
that.
>
> On 7/4/07, Hans Schwaebli <[EMAIL PROTECTED]> wrote:
> > 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.
>
>
> --
> James Staufferhttp://www.geocities.com/stauffer_james/
> 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]
>
>



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



Re: How to always log the host name?

2007-07-25 Thread ben short

James,

Could you elaborate about the MDC value please. What is it, how do i set it?

Regards

Ben

On 7/5/07, James Stauffer <[EMAIL PROTECTED]> wrote:

I had added the hostname as an MDC value at application startup to achieve that.

On 7/4/07, Hans Schwaebli <[EMAIL PROTECTED]> wrote:
> 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.


--
James Staufferhttp://www.geocities.com/stauffer_james/
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]




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



Re: How to always log the host name?

2007-07-05 Thread James Stauffer

I had added the hostname as an MDC value at application startup to achieve that.

On 7/4/07, Hans Schwaebli <[EMAIL PROTECTED]> wrote:

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.



--
James Staufferhttp://www.geocities.com/stauffer_james/
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]



RE: [SPAM (Bayesain Analysis)] - How to always log the host name? - Bayesian Filter detected spam

2007-07-05 Thread Bender Heri
Put the hostname somewhere at app start into MDC:

  MDC.put( "hostname", myHostname );

The conversionPattern can resolve MDC values by using the switch %X{}. 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: log4j-user@logging.apache.org
> 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]



How to always log the host name?

2007-07-04 Thread Hans Schwaebli
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.