i see two possible options that don't involve modifying the current Velocity code...
1) the AvalonLogChute class first tries to get its Avalon Logger via Heirarchy.getDefaultHeirarchy().getLoggerFor(<some logger name>). This <some logger name> is null by default but can be set to a valid logger name via the "runtime.log.logsystem.avalon.logger" property in your velocity.properties. So, it would seem that if you create a logger for <some logger name> in the default log heirarchy and then start up your VelocityEngine using the property: runtime.log.logsystem.avalon.logger=<some logger name> then the AvalonLogChute should use your Logger of choice. this appears to be the intended pattern by those who first designed the AvalonLogChute 2) you can create your own LogChute implementation that wraps your Logger and add an instance of this class you created directly to the Properties used to init() your VelocityEngine under the key "runtime.log.logsystem". Velocity's LogManager always first checks the configuration properties for LogChute under that key before trying any other means to get a LogChute. On 6/26/07, Thomas Vandahl <[EMAIL PROTECTED]> wrote:
Hi folks, I'm trying to implement a messaging service as an Avalon component. There I create a VelocityEngine instance and I would like to pass it the Avalon logger I have available in my component. In Velocity 1.5 AvalonLogChute would seem to be the way to do this. But how do I set my logger? The member variable LOGGER is of type String. How is this supposed to work? Bye, Thomas. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
