some extra logging.
[utils] / crawler / kiss / src / org / wamblee / crawler / kiss / main / ProgramActionExecutor.java
index d47868f5ad040871340a905f7a58ccd5beff2521..44132b5f5e88d42f93ee2d82f9f64f4bf2331aa8 100644 (file)
@@ -22,6 +22,8 @@ import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.dom4j.DocumentFactory;
 import org.dom4j.Element;
 import org.wamblee.crawler.kiss.guide.Program;
@@ -29,10 +31,12 @@ import org.wamblee.crawler.kiss.guide.Program.RecordingResult;
 
 /**
  * Provides execution of actions for programs. Actions use this class to tell
- * the executor what to do. The executor then decide on exactly what to do and
+ * the executor what to do. The executor then decides on exactly what to do and
  * in what order and makes decisions in case of conflicts.
  */
 public class ProgramActionExecutor {
+    
+    private static final Log LOG = LogFactory.getLog(ProgramActionExecutor.class);
 
     /**
      * A map of category name to a set of program. Useful for displaying the
@@ -74,6 +78,7 @@ public class ProgramActionExecutor {
      *            Program to record.
      */
     public void recordProgram(int aPriority, Program aProgram) {
+        LOG.info("priority = " + aPriority + ", program: " + aProgram);
         _showsToRecord.add(aProgram);
     }
 
@@ -86,6 +91,7 @@ public class ProgramActionExecutor {
      *            Program.
      */
     public void interestingProgram(String aCategory, Program aProgram) {
+        LOG.info("category = '" + aCategory + "', program: " + aProgram);
         Set<Program> programs = _interestingShows.get(aCategory);
         if (programs == null) {
             programs = new TreeSet<Program>(new Program.TimeSorter());