[
https://issues.apache.org/jira/browse/VELOCITY-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637542#action_12637542
]
Claude Brisson commented on VELOCITY-621:
-----------------------------------------
I don't know slf4j, but all you need to do is create a Slf4jLogChute bridge
class that implements org.apache.velocity.runtime.log.LogChute.
Then, you can put the following in your velocity.properties:
runtime.log.logsystem.class=your_class_name
runtime.log.slf4j.your_custom_property=whatever
You can read the value of the custom property (the loglevel, for instance) in
the LogChute.init() method using:
String value = rs.getString("runtime.log.slf4j.your_custom_property");
(btw, the exception you see is fixed in the upcoming 1.6 release, but anyway
you don't get it if you explicitely define a logger)
> Update to SLF4J or workaround?
> ------------------------------
>
> Key: VELOCITY-621
> URL: https://issues.apache.org/jira/browse/VELOCITY-621
> Project: Velocity
> Issue Type: Improvement
> Components: Engine
> Affects Versions: 1.4, 1.5
> Reporter: SebastianWagner
>
> I know that it has been discussed one year ago in VELOCITY-392
> but there is need for at least a workaround for people who are forced to use
> slf4j.
> For example other frameworks did already switch like Hibernate.
> So there is now definitely need for something to enable Velocity to run
> without errors in a environment with log4j-over-slf4j.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]