Index: core/src/main/java/quickfix/FileLog.java =================================================================== --- core/src/main/java/quickfix/FileLog.java (revision 918) +++ core/src/main/java/quickfix/FileLog.java (working copy) @@ -27,6 +27,8 @@ import java.io.UnsupportedEncodingException; import org.quickfixj.CharsetSupport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import quickfix.field.converter.UtcTimestampConverter; @@ -37,6 +39,7 @@ * @see quickfix.FileLogFactory */ public class FileLog extends AbstractLog { + private Logger log = LoggerFactory.getLogger(getClass()); private static final byte[] TIME_STAMP_DELIMETER; static { try { @@ -143,7 +146,7 @@ closeFiles(); openLogStreams(false); } catch (IOException e) { - System.err.println("Could not clear log: "+getClass().getName()); + log.error("Could not clear log: "+getClass().getName(), e); } } } \ No newline at end of file Index: core/src/main/java/quickfix/JdbcLog.java =================================================================== --- core/src/main/java/quickfix/JdbcLog.java (revision 918) +++ core/src/main/java/quickfix/JdbcLog.java (working copy) @@ -31,7 +31,11 @@ import javax.sql.DataSource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + class JdbcLog extends AbstractLog { + private Logger log = LoggerFactory.getLogger(getClass()); private static final String DEFAULT_MESSAGES_LOG_TABLE = "messages_log"; private static final String DEFAULT_EVENT_LOG_TABLE = "event_log"; private final String outgoingMessagesTableName; @@ -146,8 +150,7 @@ Connection connection = null; PreparedStatement insert = null; if (recursiveException != null) { - System.err.println("JdbcLog cannot log SQLException due to recursive log errors!"); - recursiveException.printStackTrace(); + log.error("JdbcLog cannot log SQLException due to recursive log errors!", recursiveException); recursiveException = null; return; }