mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
added logging
This commit is contained in:
@@ -5,10 +5,15 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.commafeed.backend.dao.FeedEntryStatusDAO;
|
||||
|
||||
public class DatabaseCleaner {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(DatabaseCleaner.class);
|
||||
|
||||
@Inject
|
||||
FeedEntryStatusDAO feedEntryStatusDAO;
|
||||
|
||||
@@ -21,7 +26,9 @@ public class DatabaseCleaner {
|
||||
do {
|
||||
deleted = feedEntryStatusDAO.delete(cal.getTime(), 100);
|
||||
total += deleted;
|
||||
log.info("removed %d statuses", total);
|
||||
} while (deleted != 0);
|
||||
log.info("cleanup done: %d", total);
|
||||
return total;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user