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 Carlos Prendes Espinosa <ca...@gmail.com> on 2006/09/05 10:42:28 UTC

log4j

Hello everybody,
I am Carlos Prendes , I have a problem with the library log4j, i am using
log4j for logging the messages that a class in a web service throws, my web
service is working properly and it answers requests from the client (done
with axis 1.4 as well), the problem is that when I put a file
log4j.properties in the web services container the file configured in
log4j.properties (myLog.log) is created but JUST the messages from the
library org.apache etc. are registered and the messages from my implementing
classes of the web service are lost.

I do not know if my explanation has been enough clear but, someone can help?

Thank you very much in advance.

Re: log4j

Posted by Carlos Prendes Espinosa <ca...@gmail.com>.
OK, thank you very much Robert ;)

2006/9/5, robert lazarski <ro...@gmail.com>:
>
> One way to get what your after is define categories. In the following
> log4j.properties, two files are put in tomcat/logs , one for
> org.apache classes and another for com.myapp. And also, running the
> app in eclipse you'll see the messages in the console, and in tomcat
> the messages will all be appended to catalina.out  :
>
> log4j.appender.console1=org.apache.log4j.ConsoleAppender
>
> log4j.appender.console1.layout=org.apache.log4j.PatternLayout
> log4j.appender.console1.layout.ConversionPattern=%m
>
> log4j.appender.console2=org.apache.log4j.ConsoleAppender
>
> log4j.appender.console2.layout=org.apache.log4j.PatternLayout
> log4j.appender.console2.layout.ConversionPattern=%d [%c] - %m%n
>
> log4j.appender.apacheOrg=org.apache.log4j.RollingFileAppender
> log4j.appender.apacheOrg.layout=org.apache.log4j.PatternLayout
> log4j.appender.apacheOrg.layout.ConversionPattern=%d [%c] - %m%n
>
> log4j.appender.apacheOrg.File=${catalina.home}/logs/apache_logs.log
>
> log4j.appender.apacheOrg.MaxFileSize=40000KB
> log4j.appender.apacheOrg.MaxBackupIndex=1
>
> log4j.appender.appErros=org.apache.log4j.RollingFileAppender
> log4j.appender.appErros.layout=org.apache.log4j.PatternLayout
> log4j.appender.appErros.layout.ConversionPattern=%m
> log4j.appender.appErros.File=app_erros.log
>
> log4j.appender.appErros.MaxFileSize=400KB
> log4j.appender.appErros.MaxBackupIndex=1
>
> log4j.appender.appDebug=org.apache.log4j.RollingFileAppender
> log4j.appender.appDebug.layout=org.apache.log4j.PatternLayout
> #log4j.appender.appDebug.layout.ConversionPattern=%-4r %-5p %c %x - %m%n
> log4j.appender.appDebug.layout.ConversionPattern=%d [%c] - %m%n
>
> log4j.appender.appDebug.File=${catalina.home}/logs/app_debug.log
>
> log4j.appender.appDebug.MaxFileSize=40000KB
> log4j.appender.appDebug.MaxBackupIndex=1
>
> log4j.rootLogger=DEBUG, console2
>
> log4j.category.com.myapp=DEBUG, console2, appDebug
>
> log4j.category.org.apache=DEBUG, console2, apacheOrg
>
> HTH,
> Robert
>
> On 9/5/06, Carlos Prendes Espinosa <ca...@gmail.com> wrote:
> > Hello everybody,
> > I am Carlos Prendes , I have a problem with the library log4j, i am
> using
> > log4j for logging the messages that a class in a web service throws, my
> web
> > service is working properly and it answers requests from the client
> (done
> > with axis 1.4 as well), the problem is that when I put a file
> > log4j.properties in the web services container the file configured in
> > log4j.properties (myLog.log) is created but JUST the messages from the
> > library org.apache etc. are registered and the messages from my
> implementing
> > classes of the web service are lost.
> >
> > I do not know if my explanation has been enough clear but, someone can
> help?
> >
> > Thank you very much in advance.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: log4j

Posted by robert lazarski <ro...@gmail.com>.
One way to get what your after is define categories. In the following
log4j.properties, two files are put in tomcat/logs , one for
org.apache classes and another for com.myapp. And also, running the
app in eclipse you'll see the messages in the console, and in tomcat
the messages will all be appended to catalina.out  :

log4j.appender.console1=org.apache.log4j.ConsoleAppender

log4j.appender.console1.layout=org.apache.log4j.PatternLayout
log4j.appender.console1.layout.ConversionPattern=%m

log4j.appender.console2=org.apache.log4j.ConsoleAppender

log4j.appender.console2.layout=org.apache.log4j.PatternLayout
log4j.appender.console2.layout.ConversionPattern=%d [%c] - %m%n

log4j.appender.apacheOrg=org.apache.log4j.RollingFileAppender
log4j.appender.apacheOrg.layout=org.apache.log4j.PatternLayout
log4j.appender.apacheOrg.layout.ConversionPattern=%d [%c] - %m%n

log4j.appender.apacheOrg.File=${catalina.home}/logs/apache_logs.log

log4j.appender.apacheOrg.MaxFileSize=40000KB
log4j.appender.apacheOrg.MaxBackupIndex=1

log4j.appender.appErros=org.apache.log4j.RollingFileAppender
log4j.appender.appErros.layout=org.apache.log4j.PatternLayout
log4j.appender.appErros.layout.ConversionPattern=%m
log4j.appender.appErros.File=app_erros.log

log4j.appender.appErros.MaxFileSize=400KB
log4j.appender.appErros.MaxBackupIndex=1

log4j.appender.appDebug=org.apache.log4j.RollingFileAppender
log4j.appender.appDebug.layout=org.apache.log4j.PatternLayout
#log4j.appender.appDebug.layout.ConversionPattern=%-4r %-5p %c %x - %m%n
log4j.appender.appDebug.layout.ConversionPattern=%d [%c] - %m%n

log4j.appender.appDebug.File=${catalina.home}/logs/app_debug.log

log4j.appender.appDebug.MaxFileSize=40000KB
log4j.appender.appDebug.MaxBackupIndex=1

log4j.rootLogger=DEBUG, console2

log4j.category.com.myapp=DEBUG, console2, appDebug

log4j.category.org.apache=DEBUG, console2, apacheOrg

HTH,
Robert

On 9/5/06, Carlos Prendes Espinosa <ca...@gmail.com> wrote:
> Hello everybody,
> I am Carlos Prendes , I have a problem with the library log4j, i am using
> log4j for logging the messages that a class in a web service throws, my web
> service is working properly and it answers requests from the client (done
> with axis 1.4 as well), the problem is that when I put a file
> log4j.properties in the web services container the file configured in
> log4j.properties (myLog.log) is created but JUST the messages from the
> library org.apache etc. are registered and the messages from my implementing
> classes of the web service are lost.
>
> I do not know if my explanation has been enough clear but, someone can help?
>
> Thank you very much in advance.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org