struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manfred Wolff <wo...@manfred-wolff.de>
Subject Re: Struts Project + Logging
Date Thu, 14 Sep 2006 14:58:57 GMT

Just an example:

log4j.rootCategory= DEBUG, ConsoleApp, FileMyApp, FileOtherApp

log4j.appender.ConsoleApp.threshold=DEBUG
log4j.appender.FileApp.threshold=DEBUG

#+++++++++++++++++++++++++++++++++
# Appender for my application
#+++++++++++++++++++++++++++++++++
log4j.appender.FileMyApp=org.apache.log4j.RollingFileAppender
log4j.appender.FileMyApp.File=/myApp
log4j.appender.FileMyApp.MaxFileSize=5000KB
log4j.appender.FileMyApp.MaxBackupIndex=5
log4j.appender.FileMyApp.layout=org.apache.log4j.PatternLayout
log4j.appender.FileMyApp.layout.ConversionPattern=%d{ISO8601} %-5p
(%t)[%c{1}] %m%n

#+++++++++++++++++++++++++++++++++
# Appender for other stuff
#+++++++++++++++++++++++++++++++++
log4j.appender.FileOtherApp=org.apache.log4j.RollingFileAppender
log4j.appender.FileOtherApp.File=/otherApp
log4j.appender.FileOtherApp.MaxFileSize=5000KB
log4j.appender.FileOtherApp.MaxBackupIndex=5
log4j.appender.FileOtherApp.layout=org.apache.log4j.PatternLayout
log4j.appender.FileOtherApp.layout.ConversionPattern=%d{ISO8601} %-5p
(%t)[%c{1}] %m%n

#+++++++++++++++++++++++++++++++++
# Appender for console
#+++++++++++++++++++++++++++++++++
log4j.appender.ConsoleApp=org.apache.log4j.ConsoleAppender
log4j.appender.ConsoleApp.layout=org.apache.log4j.PatternLayout
log4j.appender.ConsoleApp.layout.ConversionPattern=%d{ISO8601} %-5p
[%c{1}] %m%n


#my.package to myApp
log4j.logger.my.package= debug, myApp
#org.apache for otherApp
log4j.logger.org.apache=info, otherApp

yours Manfred

Struts goes mobile: http://strutsme.org


Raghuveer wrote:
> Since for struts framework commons-logging.jar is used
> How can I use Commons logging so that logs related to my application are
> sent to separate log file.
> How to configure my logger   by log.properties  realted to application
> alone.
>
>
>
>
>
>   


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


Mime
View raw message