Revision: 17819
          http://sourceforge.net/p/gate/code/17819
Author:   markagreenwood
Date:     2014-04-11 17:52:42 +0000 (Fri, 11 Apr 2014)
Log Message:
-----------
sensible conditions for some of the log messages which actually allow you to 
turn them on and off, fixes bug #132

Modified Paths:
--------------
    gate/trunk/plugins/Learning/src/gate/learning/LearningAPIMain.java

Modified: gate/trunk/plugins/Learning/src/gate/learning/LearningAPIMain.java
===================================================================
--- gate/trunk/plugins/Learning/src/gate/learning/LearningAPIMain.java  
2014-04-11 15:29:39 UTC (rev 17818)
+++ gate/trunk/plugins/Learning/src/gate/learning/LearningAPIMain.java  
2014-04-11 17:52:42 UTC (rev 17819)
@@ -568,10 +568,10 @@
             break;
           case TRAINING:
             // empty the data file
-            Long tm1,
-            tm2,
-            tm3;
-            if(LogService.DEBUG > 1) {
+            Long tm1 = null,
+            tm2 = null,
+            tm3 = null;
+            if(LogService.minVerbosityLevel >= LogService.DEBUG) {
               tm1 = new Date().getTime();
             }
             EvaluationBasedOnDocs.emptyDatafile(wdResults, true);
@@ -604,7 +604,7 @@
             Benchmark.checkPoint(startTime, getBenchmarkId() + "."
                     + Benchmark.ANNOTS_TO_NLP_FEATURES, this,
                     benchmarkingFeatures);
-            if(LogService.DEBUG > 1) {
+            if(LogService.minVerbosityLevel >= LogService.DEBUG) {
               tm2 = new Date().getTime();
               tm3 = tm2 - tm1;
               tm3 /= 1000;
@@ -636,7 +636,7 @@
                     .checkPoint(startTime, getBenchmarkId() + "."
                             + Benchmark.NLP_FEATURES_TO_FVS, this,
                             benchmarkingFeatures);
-            if(LogService.DEBUG > 1) {
+            if(LogService.minVerbosityLevel >= LogService.DEBUG) {
               tm1 = new Date().getTime();
               tm3 = tm1 - tm2;
               tm3 /= 1000;
@@ -651,7 +651,7 @@
               Benchmark.checkPoint(startTime, getBenchmarkId() + "."
                       + Benchmark.FILTERING, this, benchmarkingFeatures);
             }
-            if(LogService.DEBUG > 1) {
+            if(LogService.minVerbosityLevel >= LogService.DEBUG) {
               tm2 = new Date().getTime();
               tm3 = tm2 - tm1;
               tm3 /= 1000;
@@ -663,7 +663,7 @@
             Benchmark.checkPoint(startTime, getBenchmarkId() + "."
                     + Benchmark.MODEL_TRAINING, this, benchmarkingFeatures);
             benchmarkingFeatures.remove("numDocs");
-            if(LogService.DEBUG > 1) {
+            if(LogService.minVerbosityLevel >= LogService.DEBUG) {
               tm1 = new Date().getTime();
               tm3 = tm1 - tm2;
               tm3 /= 1000;
@@ -680,7 +680,7 @@
                   modelFileName + "!");
             }
             if(endDocIdApp > startDocIdApp) {
-              if(LogService.minVerbosityLevel > 0)
+              if(LogService.minVerbosityLevel > LogService.MINIMUM)
                 System.out.println("** "
                         + "Application mode for document from " + startDocIdApp
                         + " to " + endDocIdApp + "(not included):");
@@ -764,7 +764,7 @@
             }
             break;
           case EVALUATION:
-            if(LogService.minVerbosityLevel > 0) {
+            if(LogService.minVerbosityLevel > LogService.MINIMUM) {
               System.out.println("** Evaluation mode started:");
             }
             LogService.logMessage("** Evaluation mode:", 1);
@@ -877,7 +877,7 @@
             benchmarkingFeatures.remove("numDocs");
             break;
           case MITRAINING:
-            if(LogService.minVerbosityLevel > 0)
+            if(LogService.minVerbosityLevel > LogService.MINIMUM)
               System.out.println("** MITRAINING mode:");
             LogService.logMessage("** MITRAINING mode:", 1);
             isTraining = true;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to