commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SPRINGER,IAN (HP-NewJersey,ex1)" <ian_sprin...@hp.com>
Subject RE: [logging] commons-logging and log4.configuration
Date Thu, 27 Mar 2003 16:26:55 GMT
| Hi,
| 
| As I understand it, if I have a commons-logging.properties on my
| classpath then the concrete logger will use this properties file
| as its own configuration? 

I don't think this is true.
 
| As it happens, I need to specify the log4.configuration system
| property to make it pick up its own configuration.  Is this
| correct?  Is commons-logging.properties only to contain
| properties for the commons-logging package and not for the
| logging implementations?

Yes, this is what you currently have to do, but I consider it a major
shortcoming in Common-Logging. I think an initialize() method needs to be
added to LogFactory. Then the concrete LogFactorys would override this
method to do initialization in their own way (ie - Log4JFactory would call
PropertyConfigurator.configure()).  There could also be a configure( String
config_location ) method on LogFactory that concrete factories could
override. The location String  could be interpreted as a URL, a path, or
both (as Log4J does); that would be up to the impl.

I don't think you want to make commons-logging.properties contain
impl-specific config properties. Some impls might not even use a properties
file for their configuration - they might use XML or some other format.

One other idea is to define a new Common-Logging config file format.
LogFactory concrete impls would then map the Common-Logging format to their
own config format in order to initialize.

--Ian

| Thanks,
| -John K
| 
| 
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
| For additional commands, e-mail: commons-dev-help@jakarta.apache.org
| 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message