NO-JIRA: logger on Exception

This commit is contained in:
Clebert Suconic 2017-03-14 09:50:19 -04:00
parent b58381f20e
commit 75a4162a36
1 changed files with 4 additions and 0 deletions

View File

@ -40,9 +40,12 @@ import org.apache.activemq.artemis.core.journal.impl.dataformat.JournalDeleteRec
import org.apache.activemq.artemis.core.journal.impl.dataformat.JournalInternalRecord; import org.apache.activemq.artemis.core.journal.impl.dataformat.JournalInternalRecord;
import org.apache.activemq.artemis.core.journal.impl.dataformat.JournalRollbackRecordTX; import org.apache.activemq.artemis.core.journal.impl.dataformat.JournalRollbackRecordTX;
import org.apache.activemq.artemis.journal.ActiveMQJournalLogger; import org.apache.activemq.artemis.journal.ActiveMQJournalLogger;
import org.jboss.logging.Logger;
public class JournalCompactor extends AbstractJournalUpdateTask implements JournalRecordProvider { public class JournalCompactor extends AbstractJournalUpdateTask implements JournalRecordProvider {
private static final Logger logger = Logger.getLogger(JournalCompactor.class);
// We try to separate old record from new ones when doing the compacting // We try to separate old record from new ones when doing the compacting
// this is a split line // this is a split line
// We will force a moveNextFiles when the compactCount is bellow than COMPACT_SPLIT_LINE // We will force a moveNextFiles when the compactCount is bellow than COMPACT_SPLIT_LINE
@ -241,6 +244,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
try { try {
command.execute(); command.execute();
} catch (Exception e) { } catch (Exception e) {
logger.warn(e.getMessage(), e);
ActiveMQJournalLogger.LOGGER.errorReplayingCommands(e); ActiveMQJournalLogger.LOGGER.errorReplayingCommands(e);
} }
} }