From: erik Date: Sun, 19 Mar 2006 12:40:22 +0000 (+0000) Subject: (no commit message) X-Git-Tag: BEFORE_MAVEN_MIGRATION~183 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=57d50b5b5f5f61e327018824903d3c78a694d7ff;p=utils --- diff --git a/crawler/basic/src/log4j.properties b/crawler/basic/src/log4j.properties index ab710b36..65256149 100644 --- a/crawler/basic/src/log4j.properties +++ b/crawler/basic/src/log4j.properties @@ -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 diff --git a/crawler/basic/src/org/wamblee/crawler/impl/CrawlerImpl.java b/crawler/basic/src/org/wamblee/crawler/impl/CrawlerImpl.java index 9f985dc4..0188ad31 100644 --- a/crawler/basic/src/org/wamblee/crawler/impl/CrawlerImpl.java +++ b/crawler/basic/src/org/wamblee/crawler/impl/CrawlerImpl.java @@ -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); diff --git a/crawler/kiss/src/org/wamblee/crawler/kiss/InterestingProgramAction.java b/crawler/kiss/src/org/wamblee/crawler/kiss/InterestingProgramAction.java index 5cb9925f..015694b2 100644 --- a/crawler/kiss/src/org/wamblee/crawler/kiss/InterestingProgramAction.java +++ b/crawler/kiss/src/org/wamblee/crawler/kiss/InterestingProgramAction.java @@ -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); + } } } diff --git a/crawler/kiss/src/org/wamblee/crawler/kiss/KissCrawler.java b/crawler/kiss/src/org/wamblee/crawler/kiss/KissCrawler.java index 5922cc42..7a0d421d 100644 --- a/crawler/kiss/src/org/wamblee/crawler/kiss/KissCrawler.java +++ b/crawler/kiss/src/org/wamblee/crawler/kiss/KissCrawler.java @@ -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 could not 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); } } diff --git a/crawler/kiss/src/org/wamblee/crawler/kiss/Program.java b/crawler/kiss/src/org/wamblee/crawler/kiss/Program.java index 7cb86cfd..2358180a 100644 --- a/crawler/kiss/src/org/wamblee/crawler/kiss/Program.java +++ b/crawler/kiss/src/org/wamblee/crawler/kiss/Program.java @@ -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; } }