Ignore:
Timestamp:
08/31/12 10:27:50 (12 years ago)
Author:
pharms
Message:
  • use console for logging instead of logger
Location:
trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/manager/TaskTreeManager.java

    r710 r725  
    11package de.ugoe.cs.quest.tasktrees.manager; 
    22 
    3 import java.util.logging.Logger; 
     3import java.util.logging.Level; 
    44 
    55import de.ugoe.cs.quest.eventcore.Event; 
     
    1111import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode; 
    1212import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNodeFactory; 
     13import de.ugoe.cs.util.console.Console; 
    1314 
    1415/** 
     
    2223    /** */ 
    2324    private static final int MAX_EVENTS_TILL_RULE_APPLICATION = 100; 
    24  
    25     /** */ 
    26     private static Logger LOG = Logger.getLogger(TaskTreeManager.class.getName()); 
    2725 
    2826    /** */ 
     
    5149     */ 
    5250    public void handleNewEvent(Event event) { 
    53         addEventTask(taskTreeNodeFactory.createNewEventTask(event.getType(), event.getTarget())); 
     51        handleEventTask(taskTreeNodeFactory.createNewEventTask(event.getType(), event.getTarget())); 
    5452    } 
    5553 
     
    5856     */ 
    5957    public synchronized ITaskTree getTaskTree() { 
    60         LOG.info("applying rules temporal relationship generation rules"); 
     58        Console.traceln(Level.INFO, "applying temporal relationship generation rules"); 
    6159 
    6260        ISequence currentRootSequence = rootSequence.clone(); 
     
    6866 
    6967    /** 
    70      * @param task 
    71      */ 
    72     private synchronized void addEventTask(IEventTask task) { 
    73         handleEventTask(task); 
    74     } 
    75  
    76     /** 
    7768     * adds the task to the current or the new sequence. The decision depends on the type of task. 
    7869     * If the task finishes the current sequence, the sequence is marked as finished If the task 
     
    8071     * finished. Otherwise it is added to a new sequence. 
    8172     */ 
    82     private void handleEventTask(IEventTask eventTask) { 
     73    private synchronized void handleEventTask(IEventTask eventTask) { 
    8374        if (!(eventTask.getEventType() instanceof KeyboardFocusChange)) { 
    84             LOG.info("handling interaction event task \"" + eventTask + "\""); 
     75            Console.traceln(Level.INFO, "handling interaction event task \"" + eventTask + "\""); 
    8576            addTaskToSequence(eventTask); 
    8677        } 
     
    9788            eventsTillRuleApplication = MAX_EVENTS_TILL_RULE_APPLICATION; 
    9889 
    99             LOG.info("applying rules temporal relationship generation rules"); 
     90            Console.traceln(Level.INFO, "applying temporal relationship generation rules"); 
    10091            ComponentManager.getTemporalRelationshipRuleManager().applyRules(rootSequence, 
    10192                                                                             taskTreeBuilder, 
  • trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/nodeequality/NodeEqualityRuleManager.java

    r655 r725  
    2020 */ 
    2121public class NodeEqualityRuleManager { 
    22  
    23     /** */ 
    24     // private static Logger LOG = Logger.getLogger(NodeEqualityRuleManager.class.getName()); 
    2522 
    2623    /** */ 
  • trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java

    r721 r725  
    33import java.util.ArrayList; 
    44import java.util.List; 
    5 import java.util.logging.Logger; 
     5import java.util.logging.Level; 
    66 
    77import de.ugoe.cs.quest.tasktrees.nodeequality.NodeEqualityRuleManager; 
     
    99import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode; 
    1010import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNodeFactory; 
     11import de.ugoe.cs.util.console.Console; 
    1112 
    1213/** 
     
    1819public class TemporalRelationshipRuleManager { 
    1920     
    20     /** */ 
    21     private static Logger LOG = Logger.getLogger(TemporalRelationshipRuleManager.class.getName()); 
    22  
    2321    /** */ 
    2422    private NodeEqualityRuleManager nodeEqualityRuleManager; 
     
    4139     */ 
    4240    public void init() { 
    43         LOG.info("initializing"); 
    44  
    4541        ruleIndex.add(new DefaultEventTargetSequenceDetectionRule()); 
    4642        ruleIndex.add(new TrackBarSelectionDetectionRule(nodeEqualityRuleManager)); 
     
    7975                           String               logIndent) 
    8076    { 
    81         LOG.info(logIndent + "applying rules for " + parent); 
     77        Console.traceln(Level.FINER, logIndent + "applying rules for " + parent); 
    8278 
    8379        int noOfRuleApplications = 0; 
     
    9389                     RuleApplicationStatus.RULE_APPLICATION_FINISHED)) 
    9490                { 
    95                     LOG.info(logIndent + "applied rule " + rule + " on " + parent); 
     91                    Console.traceln 
     92                        (Level.FINE, logIndent + "applied rule " + rule + " on " + parent); 
    9693                    noOfRuleApplications++; 
    9794 
     
    117114 
    118115        if (noOfRuleApplications <= 0) { 
    119             LOG.warning(logIndent + "no rules applied --> no temporal relationship generated"); 
     116            Console.traceln(Level.INFO, logIndent + "no rules applied --> no temporal " + 
     117                            "relationship generated"); 
    120118        } 
    121119 
Note: See TracChangeset for help on using the changeset viewer.