CommonsLoggingLog4JLogSystem.java | Class | Implementation of a LogSystem using Commons Logging to route Velocity message
through a IsolatedLog4JLogger setup.
Configure the following in your velocity.properties:
- runtime.log.logsystem.class=org.apache.jetspeed.webapp.logging.velocity.CommonsLoggingLog4JLogSystem
- runtime.log.logsystem.log4j.category=<a Log4J Category name to capture Velocity message, default value: "velocity">
For further information about setting up and configuring velocity:
Velocity - Developer's Guide
If you want to use a VelocityEngine instantiated by Spring using its org.springframework.ui.velocity.VelocityEngineFactoryBean
then you can also configure the above properties inline in its defintion or point it to your velocity.properties file.
But, beware of the following: the VelocityEngineFactoryBean by default overrides logging any configuration and hooks up their own
CommonsLoggingLogSystem. |