I did not alter the server's log4j configuration - the example is taken from
my application's log4j configuration file.


----- Original Message -----
From: "Anders Engstr�m" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 9:15 PM
Subject: Re: [JBoss-user] JBoss & Log4J


On Thu, Feb 13, 2003 at 04:58:19PM +0200, Zeev B wrote:
> > 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.
>

Thanks for the comment. This is probably the way we'll have to configure
our application logging in JBoss.

But the problem still remains - why should I tamper with a server
configuration file to modify logging within a deployed application?

//Anders

--
|===================================================|
|    Anders Engstr�m                                |
|    [EMAIL PROTECTED]                            |
|    http://www.gnejs.net                           |
|    PGP-Key: http://dmzc.gnejs.net/public_key.asc  |
|===================================================|
|    Your mind is like an umbrella.                 |
|    It doesn't work unless you open it.            |
|      /Frank Zappa                                 |
|===================================================|





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





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to