Jeff,

Log4j uses org.apache.log4j.config.PropertySetter to set the properties specified in 
the <param> tag.  PropertySetter can only set properties that are assignable from the 
following types: String, Integer, Long, Boolean, and Priority.  In order to set the 
ResourceBundle property on a logger you need to call the setResourceBundle() method 
directly.  

I do this in a custom LoggerFactory every time I create a logger.  You can follow the 
procedure in http://marc.theaimsgroup.com/?l=log4j-user&m=106312777504479&w=2 to 
create and use a custom LoggerFactory.  

Good luck,
Mark


Hello,

 

I was wondering if anyone has been successful in getting resource
bundles to work with log4j and its l7dlog() methods.  I know everything
works great if the resource bundle is explicitly set using the setter
methods but I've tried specifying the resource bundle through an XML
configuration and fail due to an internal log4j error ("Failed to set
property [resourceBundle] to value resourceBundle.").  I cannot seem to
find an example of this type of configuration anywhere on the internet,
and was wondering if there was a problem or I was doing something
completely wrong.

 

Thanks,
Jeff

 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to