Checkpoint cleanup

* Checkpoint.java
    calculate shortName correctly
* CrawlerLoggerModule.java
    use full checkpoint-name for log-rotation-suffix
This commit is contained in:
gojomo
2009-11-23 08:10:07 +00:00
parent d93129115e
commit 4127286a1c
2 changed files with 2 additions and 2 deletions
@@ -86,7 +86,7 @@ public class Checkpoint implements InitializingBean {
public void afterPropertiesSet() {
name = checkpointDir.getFile().getName();
shortName = name.substring(name.indexOf("-"));
shortName = name.substring(0, name.indexOf("-"));
}
public void setSuccess(boolean b) {
@@ -352,7 +352,7 @@ public class CrawlerLoggerModule
*/
public void doCheckpoint(Checkpoint checkpointInProgress) throws IOException {
// Rotate off crawler logs.
rotateLogFiles("." + checkpointInProgress.getShortName());
rotateLogFiles("." + checkpointInProgress.getName());
}
public void finishCheckpoint(Checkpoint checkpointInProgress) {}