![]() |
Screen based implementation of Log. More...
#include <Log.h>
Public Member Functions | |
ScreenLog (bool incoming, bool outgoing, bool event) | |
ScreenLog (const SessionID &sessionID, bool incoming, bool outgoing, bool event) | |
void | clear () |
void | backup () |
void | onIncoming (const std::string &value) |
void | onOutgoing (const std::string &value) |
void | onEvent (const std::string &value) |
bool | getMillisecondsInTimeStamp () const |
void | setMillisecondsInTimeStamp (bool value) |
Private Attributes | |
std::string | m_prefix |
UtcTimeStamp | m_time |
bool | m_incoming |
bool | m_outgoing |
bool | m_event |
bool | m_millisecondsInTimeStamp |
Static Private Attributes | |
static Mutex | s_mutex |
Screen based implementation of Log.
This will display all log information onto the standard output
Definition at line 115 of file Log.h.
FIX::ScreenLog::ScreenLog | ( | bool | incoming, | |
bool | outgoing, | |||
bool | event | |||
) | [inline] |
Definition at line 118 of file Log.h.
00119 : m_prefix( "GLOBAL" ), 00120 m_incoming( incoming ), m_outgoing( outgoing ), m_event( event ), m_millisecondsInTimeStamp( true ) {}
FIX::ScreenLog::ScreenLog | ( | const SessionID & | sessionID, | |
bool | incoming, | |||
bool | outgoing, | |||
bool | event | |||
) | [inline] |
Definition at line 122 of file Log.h.
00124 : m_prefix( sessionID.toString() ), 00125 m_incoming( incoming ), m_outgoing( outgoing ), m_event( event ), m_millisecondsInTimeStamp( true ) {}
void FIX::ScreenLog::backup | ( | ) | [inline, virtual] |
void FIX::ScreenLog::clear | ( | ) | [inline, virtual] |
bool FIX::ScreenLog::getMillisecondsInTimeStamp | ( | ) | const [inline] |
Definition at line 163 of file Log.h.
References m_millisecondsInTimeStamp.
00164 { return m_millisecondsInTimeStamp; }
void FIX::ScreenLog::onEvent | ( | const std::string & | value | ) | [inline, virtual] |
Implements FIX::Log.
Definition at line 152 of file Log.h.
References FIX::UtcTimeStampConvertor::convert(), m_event, m_millisecondsInTimeStamp, m_prefix, m_time, s_mutex, and FIX::UtcTimeStamp::setCurrent().
00153 { 00154 if ( !m_event ) return ; 00155 Locker l( s_mutex ); 00156 m_time.setCurrent(); 00157 std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp) 00158 << ", " << m_prefix 00159 << ", " << "event>" << std::endl 00160 << " (" << value << ")" << std::endl; 00161 }
void FIX::ScreenLog::onIncoming | ( | const std::string & | value | ) | [inline, virtual] |
Implements FIX::Log.
Definition at line 130 of file Log.h.
References FIX::UtcTimeStampConvertor::convert(), m_incoming, m_millisecondsInTimeStamp, m_prefix, m_time, s_mutex, and FIX::UtcTimeStamp::setCurrent().
00131 { 00132 if ( !m_incoming ) return ; 00133 Locker l( s_mutex ); 00134 m_time.setCurrent(); 00135 std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp) 00136 << ", " << m_prefix 00137 << ", " << "incoming>" << std::endl 00138 << " (" << value << ")" << std::endl; 00139 }
void FIX::ScreenLog::onOutgoing | ( | const std::string & | value | ) | [inline, virtual] |
Implements FIX::Log.
Definition at line 141 of file Log.h.
References FIX::UtcTimeStampConvertor::convert(), m_millisecondsInTimeStamp, m_outgoing, m_prefix, m_time, s_mutex, and FIX::UtcTimeStamp::setCurrent().
00142 { 00143 if ( !m_outgoing ) return ; 00144 Locker l( s_mutex ); 00145 m_time.setCurrent(); 00146 std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp) 00147 << ", " << m_prefix 00148 << ", " << "outgoing>" << std::endl 00149 << " (" << value << ")" << std::endl; 00150 }
void FIX::ScreenLog::setMillisecondsInTimeStamp | ( | bool | value | ) | [inline] |
Definition at line 165 of file Log.h.
References m_millisecondsInTimeStamp.
00166 { m_millisecondsInTimeStamp = value; }
bool FIX::ScreenLog::m_event [private] |
bool FIX::ScreenLog::m_incoming [private] |
Definition at line 171 of file Log.h.
Referenced by onIncoming().
bool FIX::ScreenLog::m_millisecondsInTimeStamp [private] |
Definition at line 175 of file Log.h.
Referenced by getMillisecondsInTimeStamp(), onEvent(), onIncoming(), onOutgoing(), and setMillisecondsInTimeStamp().
bool FIX::ScreenLog::m_outgoing [private] |
Definition at line 172 of file Log.h.
Referenced by onOutgoing().
std::string FIX::ScreenLog::m_prefix [private] |
Definition at line 169 of file Log.h.
Referenced by onEvent(), onIncoming(), and onOutgoing().
UtcTimeStamp FIX::ScreenLog::m_time [private] |
Definition at line 170 of file Log.h.
Referenced by onEvent(), onIncoming(), and onOutgoing().
Mutex FIX::ScreenLog::s_mutex [static, private] |
Definition at line 174 of file Log.h.
Referenced by onEvent(), onIncoming(), and onOutgoing().