Could you please post the contents of your your log4j.properties file?

cheers,
md
 

> -----Original Message-----
> From: Anthony Bull [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 14, 2007 9:34 PM
> To: Martin Gainty; [email protected]
> Subject: Re: Independent Log4j logging in Axis 2 services
> 
> 
> Thanks for the reply.  All my loggers are acquired by the following 
> (where THIS_CLASS is the current class):
> 
> Logger logger = Logger.getLogger( THIS_CLASS.class);
> 
> I'm initializing log4j with a static initializer in the 
> MessageReceiverInOut class of each service, similar to the 
> following code:
> 
> static {
>   // log4j.
>   System.out.println("log4j init");
>   try {
>     Properties props = new Properties();
>     props.load( 
> THIS_CLASS.class.getClassLoader().getResourceAsStream( 
> "log4j.properties"));
>     PropertyConfigurator.configure( props);
>   }
>   catch ( Throwable e) {
>     e.printStackTrace();
>   }
>   finally {
>     System.out.println("log4j finished");
>   }
> }
> 
> Both log files are created, but the last one to be created 
> gets all logs 
> written to it exclusively, including the Axis2 container logs such as 
> all the "Deploying web service" messages.
> 
> cheers,
> Ants.
> 
> 
> Martin Gainty wrote:
> > Appears you're acquiring the rootLogger 
> (Logger.getRootLogger) instead 
> > of NameOfLoggerYouDesire
> > try
> > Logger.getLogger(NameOfLoggerYouDesire);
> > 
> http://logging.apache.org/log4j/docs/api/org/apache/log4j/Logger.html
> >
> > M--
> > This email message and any files transmitted with it 
> contain confidential
> > information intended only for the person(s) to whom this 
> email message is
> > addressed.  If you have received this email message in 
> error, please 
> > notify
> > the sender immediately by telephone or email and destroy 
> the original
> > message without making a copy.  Thank you.
> >
> > ----- Original Message ----- From: "Anthony Bull" 
> > <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Tuesday, August 14, 2007 8:16 PM
> > Subject: Independent Log4j logging in Axis 2 services
> >
> >
> >> Hi, has anyone managed to get multiple services running under the 
> >> same axis2 instance to use independent log4j configurations?
> >>
> >> I have two services, and am configuring log4j via log4j.properties 
> >> files in each service - however, the first service starts 
> logging to 
> >> the log file for the second service as soon as the second 
> service has 
> >> been loaded.
> >>
> >> cheers,
> >> Ants.
> >>
> >> -- 
> >> Anthony
> >> -------------------------------------
> >> Anthony Bull
> >> Senior Developer
> >> Black Coffee Software Ltd
> >> PO Box 10-192 The Terrace
> >> Wellington, New Zealand
> >>
> >> [EMAIL PROTECTED]
> >> Ph  +64 4 472 8818
> >> Fax +64 4 472 8811
> >> Mobile 021 303 692
> >> -------------------------------------
> >> www.bcsoft.co.nz
> >> ---------------------------------------------------------------
> >> This email may contain confidential or privileged information,
> >> and is intended for use only by the addressee, or addressees.
> >> If you are not the intended recipient please advise the sender
> >> immediately and do not copy, use or disclose the contents to
> >> any other person or organisation.
> >> Black Coffee Software Ltd accepts no responsibility for viruses
> >> received with this email, or to any changes made to the original
> >> content. Any views or opinions expressed in this email may be
> >> personal to the sender and are not necessarily those of Black
> >> Coffee Software Ltd.
> >> ---------------------------------------------------------------
> >>
> >>
> >>
> >> 
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> 
> 
> -- 
> Anthony
> -------------------------------------
> Anthony Bull
> Senior Developer
> Black Coffee Software Ltd
> PO Box 10-192 The Terrace
> Wellington, New Zealand
> 
> [EMAIL PROTECTED]
> Ph  +64 4 472 8818
> Fax +64 4 472 8811
> Mobile 021 303 692
> -------------------------------------
> www.bcsoft.co.nz
> ---------------------------------------------------------------
> This email may contain confidential or privileged information,
> and is intended for use only by the addressee, or addressees.
> If you are not the intended recipient please advise the sender
> immediately and do not copy, use or disclose the contents to
> any other person or organisation.
> Black Coffee Software Ltd accepts no responsibility for viruses
> received with this email, or to any changes made to the original
> content. Any views or opinions expressed in this email may be
> personal to the sender and are not necessarily those of Black
> Coffee Software Ltd.
> ---------------------------------------------------------------
> 
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to