← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5161: Applied patch from Jason. Routes logging from velocity to the log4j standard logging mechanism. A...

 

------------------------------------------------------------
revno: 5161
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-11-15 07:27:22 +0100
message:
  Applied patch from Jason. Routes logging from velocity to the log4j standard logging mechanism. Avoids creation of the velocity.log files. Most velocity logging has level INFO so will not be shown by default.
added:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/WEB-INF/classes/velocity.properties
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/velocity/VelocityManager.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/velocity/VelocityManager.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/velocity/VelocityManager.java	2011-11-13 15:59:09 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/velocity/VelocityManager.java	2011-11-15 06:27:22 +0000
@@ -47,6 +47,8 @@
         velocity = new VelocityEngine();
         velocity.setProperty( Velocity.RESOURCE_LOADER, RESOURCE_LOADER_NAME );
         velocity.setProperty( RESOURCE_LOADER_NAME + ".resource.loader.class", ClasspathResourceLoader.class.getName() );
+        velocity.setProperty( "runtime.log.logsystem.log4j.logger", "console" );
+        velocity.setProperty( "runtime.log", "" );
         velocity.init();
     }
 

=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/WEB-INF/classes/velocity.properties'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/WEB-INF/classes/velocity.properties	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/WEB-INF/classes/velocity.properties	2011-11-15 06:27:22 +0000
@@ -0,0 +1,2 @@
+runtime.log.logsystem.log4j.logger=console
+runtime.log=
\ No newline at end of file