> On Thu, Feb 13, 2003 at 09:06:00AM +1100, Kevin O'Neill wrote:
> > On Thu, 2003-02-13 at 01:27, Anders Engstr?m wrote:
>
> [snip]
>
> > >
> > > We need a standard way to specify the log4j configuration independent
of
> > > the application server we are deploying to. It makes total sense to
> > > separate the appserver logging from the application's logging.
> > >
> > > How are folks handling this situation?
> >
> > Remeber that the conf directory is jsut a part of the class path and the
> > log4j config file in there is a standard log4j xml config file. I
> > usually add my logging information to it.
> >
>
> Maybe I wasn't clear enough - but this is exactly the scenario we want
> to avoid. The deployed application should have a self-contained logging
> configuration. There should be no need to modify _server_configuration_
> files to enable/modify logging for a deployed application.
>
> //Anders
I have a similar scenario with my J2EE application. I've solved the problem
by changing my log4j configuration to include definitions only to my loggers
(categories), for example:
All application classes in packages under com.mycompany.myapplication then
in the log4j properties file I have the following configuration:
log4j.appender.consoleApp=org.apache.log4j.ConsoleAppender
log4j.appender.consoleApp.layout=org.apache.log4j.PatternLayout
log4j.appender.consoleApp.layout.ConversionPattern=%c %p - %m%n
#
log4j.appender.fileApp=org.apache.log4j.FileAppender
log4j.appender.fileApp.File=log.out
log4j.appender.fileApp.Append=false
log4j.appender.fileApp.layout=org.apache.log4j.PatternLayout
log4j.appender.fileApp.layout.ConversionPattern=%d{dd-MM-yyyy HH:mm:ss}
%.50c %-5p [%.30t] - %m%n
#
log4j.logger.com.mycompany.myapplication=DEBUG, consoleApp, fileApp
I use this configuration file to configure log4j (without resetting the
current configuration) and since I only configure my loggers it does not
affect JBoss logging.
Ze'ev
-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user