Hello All!
Couldn't you create a class that instantiates a Log4j Logger of your own?
This way you could use log4j's method
PropertyConfigurator.configure("pathToYourLog4jConfigFile");
and read always your configuration. Is it necessary to use the JBoss logger?
Excuse me if I have misunderstood something... ;-)
-----Original Message-----
From: Rod Macpherson [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 14, 2003 6:41 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] JBoss & Log4J
Ditto for weblogic which uses its own logging API versus log4j. I current
use a switch to bypass log4j configuration on jboss flavored application
servers - also to use that switch for JNDI access settings which are vendor
specific. Perhaps there is relief ahead: JDK 1.4. JBoss could use JDK 1.4
logging or stick with log4j and leave the build-in logging for applications.
----- Original Message -----
From: "Corbin, James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 2:42 PM
Subject: RE: [JBoss-user] JBoss & Log4J
Scott,
I can come up with some ways to isolate it through application configuration
files, but it isn't clean.
Currently we are deploying on JBOSS 3.x and WebSphere 5.x. JBOSS uses Log4J
for logging and WebSphere doesn't. Originally we had our own log4J
configuration file (in our deployment) but the appender settings conflicted
with the JBOSS configuration (as you can imagine).
In our case the only solution I see is to code different behavior depending
upon the app-server that the application is being deployed upon (we already
track this in an app configuration file).
For instance,
Pseudo-code...
If appserver == jboss{
Configuration file already configured by JBoss.
} Else if appserver == websphere {
Initialize the log4j configuration with a local log4j config file.
}
Log Away...
Do you, or anybody else, have suggestions around this that I may be
overlooking?
Thanks,
J.D.
-----Original Message-----
From: Scott M Stark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 2:20 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] JBoss & Log4J
There are ways to isolate the configuration from the server. In the future
an application's log4j.xml or log4j.properties and setup a configuration
based on this. Expecting portability of non-J2EE interfaces is not
realistic.
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
From: "Corbin, James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 11:51 AM
Subject: RE: [JBoss-user] JBoss & Log4J
This thread concerns me the more I follow it. Is it true that applications
running under JBOSS are required to define the application logging
information in the log4J configuration file that JBOSS uses?????
If so, this is not well implemented because we run our app on multiple web
servers, i.e., JBOSS, WebSphere and WebLogic.
Is it possible to define application level logging using Log4J that is
configurable independent of the Log4J configuration that comes with JBOSS
(I'm using 3.2RC1).
Thanks,
J.D.
-----Original Message-----
From: Anders Engstr�m [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 12:16 PM
To: [EMAIL PROTECTED]
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 electronic message transmission contains information from the Company
that may be proprietary, confidential and/or
privileged.
The information is intended only for the use of the individual(s) or entity
named above. If you are not the intended
recipient, be
aware that any disclosure, copying or distribution or use of the contents of
this information is prohibited. If you have
received
this electronic transmission in error, please notify the sender immediately
by replying to the address listed in the "From:"
field.
-------------------------------------------------------
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: 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 electronic message transmission contains information from the Company
that may be proprietary, confidential and/or privileged.
The information is intended only for the use of the individual(s) or entity
named above. If you are not the intended recipient, be
aware that any disclosure, copying or distribution or use of the contents of
this information is prohibited. If you have received
this electronic transmission in error, please notify the sender immediately
by replying to the address listed in the "From:" field.
-------------------------------------------------------
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: 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 message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
-------------------------------------------------------
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