Re: How to use Log4j in own axis2 service?

2007-08-19 Thread Anthony Bull

Hi Jochen,

for logging to work in my services, I have been having to invoke log4j 
programmatically either from my service skeleton or from the message 
receiver.


Properties props = new Properties();
props.load( ServiceSkeleton.class.getClassLoader().getResourceAsStream( 
log4j.properties));

PropertyConfigurator.configure( props);

cheers,
Ants.

Jochen Rieß wrote:

Hello everybody,

I've deployed a simple web service that uses the log4j library for the 
logging. I want everything from this service written into a single 
logfile. My service .aar has the following structure:


--service.aar
log4j.properties
de.evision. (class files are here)
lib
--log4j.jar
--(other libs)

The Service works fine, but no log output is written.
My log4j properties file looks like:

# log4j.rootLogger=DEBUG, file
log4j.logger.de.evision=DEBUG, file
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.datePattern='.'-MM-dd
log4j.appender.file.file=/tmp/mylogfile.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L 
- %m%n


I've tried several file locations, using the exact same log4j 
configuration works for a servlet running inside the tomcat container 
which also holds axis2.

I've tried it with and without the rootLogger set to Debug/file..

Any suggestions?

Thanks for your time,
Jochen Rieß



-
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]



How to use Log4j in own axis2 service?

2007-08-17 Thread Jochen Rieß

Hello everybody,

I've deployed a simple web service that uses the log4j library for the 
logging. I want everything from this service written into a single 
logfile. My service .aar has the following structure:


--service.aar
log4j.properties
de.evision. (class files are here)
lib
--log4j.jar
--(other libs)

The Service works fine, but no log output is written.
My log4j properties file looks like:

# log4j.rootLogger=DEBUG, file
log4j.logger.de.evision=DEBUG, file
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.datePattern='.'-MM-dd
log4j.appender.file.file=/tmp/mylogfile.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - 
%m%n


I've tried several file locations, using the exact same log4j 
configuration works for a servlet running inside the tomcat container 
which also holds axis2.

I've tried it with and without the rootLogger set to Debug/file..

Any suggestions?

Thanks for your time,
Jochen Rieß



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