buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/StopLogToConsoleTask.java
changeset 628 7c4a911dc066
parent 588 c7c26511138f
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
    17 
    17 
    18 
    18 
    19 package com.nokia.ant.taskdefs;
    19 package com.nokia.ant.taskdefs;
    20 
    20 
    21 import org.apache.tools.ant.Task;
    21 import org.apache.tools.ant.Task;
       
    22 
    22 import com.nokia.ant.HeliumLogger;
    23 import com.nokia.ant.HeliumLogger;
    23 
    24 
    24 /**
    25 /**
       
    26  * This task is deprecated, please consider using the 
       
    27  * hlm:taskRecorder task from the logging framework.
       
    28  * 
    25  * This task will control the outputing of the Helium logger.
    29  * This task will control the outputing of the Helium logger.
    26  * 
    30  * 
    27  * Example of usage, to stop logging to console:
    31  * Example of usage, to stop logging to console:
    28  * <pre>
    32  * <pre>
    29  * &lt;hlm:logtoconsole action="stop"/&gt;
    33  * &lt;hlm:logtoconsole action="stop"/&gt;
    33  * <pre>
    37  * <pre>
    34  * &lt;hlm:logtoconsole action="start"/&gt;
    38  * &lt;hlm:logtoconsole action="start"/&gt;
    35  * </pre> 
    39  * </pre> 
    36  * 
    40  * 
    37  * @ant.task name="logtoconsole" category="Logging"
    41  * @ant.task name="logtoconsole" category="Logging"
       
    42  * @deprecated This task is deprecated, please consider using the 
       
    43  * hlm:taskRecorder task from the logging framework.
    38  */ 
    44  */ 
       
    45 @Deprecated
    39 public class StopLogToConsoleTask extends Task 
    46 public class StopLogToConsoleTask extends Task 
    40 {   
    47 {   
    41     private boolean stopLogToConsole;
    48     private boolean stopLogToConsole;
    42     
    49     
    43     /**
    50     /**
    60     public void execute()
    67     public void execute()
    61     {
    68     {
    62         super.execute();
    69         super.execute();
    63         if (HeliumLogger.getStopLogToConsole() != stopLogToConsole)
    70         if (HeliumLogger.getStopLogToConsole() != stopLogToConsole)
    64         {
    71         {
    65             if (stopLogToConsole)
    72             if (stopLogToConsole) {
    66                 log("Logging to console suspended.");             
    73                 log("Logging to console suspended.");
       
    74             }
    67             HeliumLogger.setStopLogToConsole(stopLogToConsole);   
    75             HeliumLogger.setStopLogToConsole(stopLogToConsole);   
    68             if (!stopLogToConsole)
    76             if (!stopLogToConsole) {
    69                 log("Logging to console resumed."); 
    77                 log("Logging to console resumed.");
       
    78             }
    70         }       
    79         }       
    71     }   
    80     }   
    72 }
    81 }