quickfix
Class SLF4JLog

java.lang.Object
  extended by quickfix.SLF4JLog
All Implemented Interfaces:
Log

public class SLF4JLog
extends java.lang.Object

A Log using the SLFJ wrapper that supports JDK 1.4 logging, Log4J and others. This log should be created using the associated factory.

See Also:
SLF4JLogFactory

Field Summary
static java.lang.String DEFAULT_ERROR_EVENT_CATEGORY
           
static java.lang.String DEFAULT_EVENT_CATEGORY
           
static java.lang.String DEFAULT_INCOMING_MSG_CATEGORY
           
static java.lang.String DEFAULT_OUTGOING_MSG_CATEGORY
           
 
Constructor Summary
SLF4JLog(SessionID sessionID, java.lang.String eventCategory, java.lang.String errorEventCategory, java.lang.String incomingMsgCategory, java.lang.String outgoingMsgCategory, boolean prependSessionID, boolean logHeartbeats, java.lang.String inCallerFQCN)
           
 
Method Summary
 void clear()
          Clears the log and removes any persistent log data.
protected  void log(org.slf4j.Logger log, java.lang.String text)
          Made protected to enable unit testing of callerFQCN coming through correctly
protected  void logError(org.slf4j.Logger log, java.lang.String text)
           
protected  void logIncoming(java.lang.String message)
           
protected  void logOutgoing(java.lang.String message)
           
 void onErrorEvent(java.lang.String text)
          Logs an session error event.
 void onEvent(java.lang.String text)
          Logs a session event.
 void onIncoming(java.lang.String message)
          Logs an incoming message
 void onOutgoing(java.lang.String message)
          Logs an outgoing message
protected  void setLogHeartbeats(boolean logHeartbeats)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EVENT_CATEGORY

public static final java.lang.String DEFAULT_EVENT_CATEGORY
See Also:
Constant Field Values

DEFAULT_ERROR_EVENT_CATEGORY

public static final java.lang.String DEFAULT_ERROR_EVENT_CATEGORY
See Also:
Constant Field Values

DEFAULT_INCOMING_MSG_CATEGORY

public static final java.lang.String DEFAULT_INCOMING_MSG_CATEGORY
See Also:
Constant Field Values

DEFAULT_OUTGOING_MSG_CATEGORY

public static final java.lang.String DEFAULT_OUTGOING_MSG_CATEGORY
See Also:
Constant Field Values
Constructor Detail

SLF4JLog

public SLF4JLog(SessionID sessionID,
                java.lang.String eventCategory,
                java.lang.String errorEventCategory,
                java.lang.String incomingMsgCategory,
                java.lang.String outgoingMsgCategory,
                boolean prependSessionID,
                boolean logHeartbeats,
                java.lang.String inCallerFQCN)
Method Detail

onEvent

public void onEvent(java.lang.String text)
Description copied from interface: Log
Logs a session event.

Parameters:
text - the event description

onErrorEvent

public void onErrorEvent(java.lang.String text)
Description copied from interface: Log
Logs an session error event.

Parameters:
text - the event description

logIncoming

protected void logIncoming(java.lang.String message)

logOutgoing

protected void logOutgoing(java.lang.String message)

log

protected void log(org.slf4j.Logger log,
                   java.lang.String text)
Made protected to enable unit testing of callerFQCN coming through correctly


logError

protected void logError(org.slf4j.Logger log,
                        java.lang.String text)

clear

public void clear()
Description copied from interface: Log
Clears the log and removes any persistent log data.


setLogHeartbeats

protected void setLogHeartbeats(boolean logHeartbeats)

onIncoming

public final void onIncoming(java.lang.String message)
Description copied from interface: Log
Logs an incoming message

Specified by:
onIncoming in interface Log
Parameters:
message - the raw FIX message string

onOutgoing

public final void onOutgoing(java.lang.String message)
Description copied from interface: Log
Logs an outgoing message

Specified by:
onOutgoing in interface Log
Parameters:
message - the raw FIX message string