(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Sun, 19 Mar 2006 12:40:22 +0000 (12:40 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Sun, 19 Mar 2006 12:40:22 +0000 (12:40 +0000)
crawler/basic/src/log4j.properties
crawler/basic/src/org/wamblee/crawler/impl/CrawlerImpl.java
crawler/kiss/src/org/wamblee/crawler/kiss/InterestingProgramAction.java
crawler/kiss/src/org/wamblee/crawler/kiss/KissCrawler.java
crawler/kiss/src/org/wamblee/crawler/kiss/Program.java

index ab710b36ed32ca084c93ba8c64e3829a9ba092ac..652561490df3476ebabe327405f6966f07fc3d66 100644 (file)
@@ -10,7 +10,7 @@
 log4j.rootLogger=ERROR, console
 
 # Log level for wamblee.org
-log4j.logger.org.wamblee=DEBUG
+log4j.logger.org.wamblee=INFO
 log4j.logger.org.wamblee.usermgt.UserAdministrationImplTest=INFO
 log4j.logger.org.wamblee.security.authorization=ERROR
 log4j.logger.org.wamblee.cache=INFO
index 9f985dc46109a74a28092d7da82a4e88be32c4cc..0188ad31c94d2a8eb8a2d2e040fb7af3fd90f122 100644 (file)
@@ -59,7 +59,7 @@ public class CrawlerImpl implements Crawler {
      * @see org.wamblee.crawler.Crawler#getPage(java.lang.String)
      */
     public Page getPage(String aUrl) throws PageException {
-        LOG.info("Getting page: url = '" + aUrl + "'");
+        LOG.debug("Getting page: url = '" + aUrl + "'");
         PageRequest request = _config.getRequest(aUrl);
         Document content = request.execute(aUrl, _client);
         return transformToDom4jDoc(content);
@@ -72,7 +72,7 @@ public class CrawlerImpl implements Crawler {
      *      java.lang.String)
      */
     public Page getPage(String aUrl, PageType aType) throws PageException {
-        LOG.info("Getting page: url = '" + aUrl + "', type = '" + aType + "'");
+        LOG.debug("Getting page: url = '" + aUrl + "', type = '" + aType + "'");
         PageRequest request = _config.getRequest(aType);
         Document content = request.execute(aUrl, _client);
         return transformToDom4jDoc(content);
index 5cb9925f15230bdff243caa04554c669e4850e47..015694b2426c08e614d79021ea1d68c61066da89 100644 (file)
@@ -43,6 +43,8 @@ public class InterestingProgramAction implements ProgramAction {
      *      org.wamblee.crawler.kiss.Report)
      */
     public void execute(Program aProgram, ProgramActionExecutor aReport) {
-        aReport.interestingProgram(_category, aProgram);
+        if (aProgram.isRecordingPossible()) {
+            aReport.interestingProgram(_category, aProgram);
+        }
     }
 }
index 5922cc4209c175ee1c812a5f83b74769902e1e01..7a0d421d294e50a777c9fe02d6186924960ffbe5 100644 (file)
@@ -277,14 +277,14 @@ public class KissCrawler {
                                 .getText().trim();
                     } catch (PageException e) {
                         LOG
-                                .warn("Program details coul dnot be determined for '"
-                                        + action.getName() + "'");
+                                .warn("Program details coulnot be determined for '"
+                                        + action.getName() + "'", e);
                     }
                 }
                 Program program = new Program(aChannel, action.getName(),
                         description, keywords, interval, action);
 
-                LOG.debug("Got program " + program);
+                LOG.info("Got program " + program);
                 programs.add(program);
             }
         }
index 7cb86cfdeecea92ccb66b2f2a3a4eae7b5e485a8..2358180a405acb95e8f979746204b3886e3356c3 100644 (file)
@@ -196,15 +196,20 @@ public class Program {
      * @return Status describing the result of recording.
      */
     public RecordingResult record() {
+        LOG.info("Recording " + this);
         try {
             Action record = _programInfo.execute().getAction(RECORD_ACTION);
             if (record == null) {
+                LOG.info("  result: " + RecordingResult.OLDSHOW);
                 return RecordingResult.OLDSHOW;
             }
             Page result = record.execute();
-            return RecordingResult.valueOf(result.getContent().getText());
+            RecordingResult recordingResult = RecordingResult.valueOf(result.getContent().getText());
+            LOG.info("  result: " + recordingResult);
+            return recordingResult;
         } catch (PageException e) {
             LOG.warn("Technical problem recording program: '" + this + "'", e);
+            LOG.info("  result: " + RecordingResult.ERROR);
             return RecordingResult.ERROR;
         }
     }