You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Steffen Mayer <st...@lycos.de> on 2003/12/10 16:55:05 UTC

Logging

Hi,

I want a special-logging mechanism in my webapp. I want to send own logmessages to an file. I want to use log4j to do this. So i want a totally independent (from axis) logging mechanism. Its only to watch my application.
how must i configure log4j???

Greeting,
Steffen

Re: Logging

Posted by Patrice <pp...@nerim.net>.
Hi,

If you are using Axis with Log4j, you will see its logs with your 
application's logs.
If you don't want to see the axis's logs, you can add the folowing lines 
in your log4j configuration file:

log4j.logger.org.apache=FATAL, NULL
log4j.appender.NULL=org.apache.log4j.performance.NullAppender

Hope it helps
Patrice

>Hi,
>
>I want a special-logging mechanism in my webapp. I want to send own logmessages to an file. I want to use log4j to do this. So i want a totally independent (from axis) logging mechanism. Its only to watch my application.
>how must i configure log4j???
>
>Greeting,
>Steffen
>
>



Re: Logging

Posted by Michael Mangeng <li...@zoron.de>.
Hi

I think this question would suite better into the log4j mailinglist :)

But here is the log4j config you need:

# we log debuglogevel and the package my.funny.package and packages "below"
# this excludes axis log messages since they are in package 
org.apache.axis.*
log4j.logger.my.funny.package=DEBUG, ROLLFILE

# Appender for Logging into a rolling file
log4j.appender.ROLLFILE.File=mylog.log
log4j.appender.ROLLFILE=org.apache.log4j.RollingFileAppender
#limit files to 10mb each
log4j.appender.ROLLFILE.MaxFileSize=1000KB
#max 20 files => 200 mb
log4j.appender.ROLLFILE.MaxBackupIndex=20
log4j.appender.ROLLFILE.layout=org.apache.log4j.PatternLayout
#change this if you want another logformat - this produces: lines like:
#  20031210 17:02:08.500 INFO  my.funny.package.ActingClass  - Logmessage
log4j.appender.ROLLFILE.layout.ConversionPattern=%d{yyyyMMdd 
HH:mm:ss.SSS} %-5p %c %x - %m%n

hope this helps...

greetings,
mike

Steffen Mayer wrote:

>Hi,
>
>I want a special-logging mechanism in my webapp. I want to send own logmessages to an file. I want to use log4j to do this. So i want a totally independent (from axis) logging mechanism. Its only to watch my application.
>how must i configure log4j???
>
>Greeting,
>Steffen
>
>  
>