dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18927
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8051: Disabled logging in VelocityManager
------------------------------------------------------------
revno: 8051
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-09-12 12:51:18 +0200
message:
Disabled logging in VelocityManager
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 2012-04-25 12:24:59 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/velocity/VelocityManager.java 2012-09-12 10:51:18 +0000
@@ -40,6 +40,9 @@
private static final String RESOURCE_LOADER_NAME = "class";
private static final String VM_SUFFIX = ".vm";
+
+ private static final boolean RUNTIME_LOGGING = false;
+
private VelocityEngine velocity;
public VelocityManager()
@@ -47,8 +50,13 @@
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", "" );
+
+ if ( RUNTIME_LOGGING )
+ {
+ velocity.setProperty( "runtime.log.logsystem.log4j.logger", "console" );
+ velocity.setProperty( "runtime.log", "" );
+ }
+
velocity.init();
}