Public Member Functions | Private Attributes | Static Private Attributes | List of all members
FIX::ScreenLog Class Reference

Screen based implementation of Log. More...

#include <Log.h>

Inheritance diagram for FIX::ScreenLog:
Inheritance graph
[legend]
Collaboration diagram for FIX::ScreenLog:
Collaboration graph
[legend]

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)
 
- Public Member Functions inherited from FIX::Log
virtual ~Log ()
 

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
 

Detailed Description

Screen based implementation of Log.

This will display all log information onto the standard output

Definition at line 115 of file Log.h.

Constructor & Destructor Documentation

FIX::ScreenLog::ScreenLog ( bool  incoming,
bool  outgoing,
bool  event 
)
inline

Definition at line 118 of file Log.h.

119 : m_prefix( "GLOBAL" ),
120  m_incoming( incoming ), m_outgoing( outgoing ), m_event( event ), m_millisecondsInTimeStamp( true ) {}
bool m_event
Definition: Log.h:173
bool m_incoming
Definition: Log.h:171
bool m_millisecondsInTimeStamp
Definition: Log.h:175
std::string m_prefix
Definition: Log.h:169
bool m_outgoing
Definition: Log.h:172
FIX::ScreenLog::ScreenLog ( const SessionID sessionID,
bool  incoming,
bool  outgoing,
bool  event 
)
inline

Definition at line 122 of file Log.h.

124 : m_prefix( sessionID.toString() ),
125  m_incoming( incoming ), m_outgoing( outgoing ), m_event( event ), m_millisecondsInTimeStamp( true ) {}
bool m_event
Definition: Log.h:173
bool m_incoming
Definition: Log.h:171
bool m_millisecondsInTimeStamp
Definition: Log.h:175
std::string m_prefix
Definition: Log.h:169
bool m_outgoing
Definition: Log.h:172

Member Function Documentation

void FIX::ScreenLog::backup ( )
inlinevirtual

Implements FIX::Log.

Definition at line 128 of file Log.h.

128 {}
void FIX::ScreenLog::clear ( )
inlinevirtual

Implements FIX::Log.

Definition at line 127 of file Log.h.

127 {}
bool FIX::ScreenLog::getMillisecondsInTimeStamp ( ) const
inline

Definition at line 163 of file Log.h.

References m_millisecondsInTimeStamp.

164  { return m_millisecondsInTimeStamp; }
bool m_millisecondsInTimeStamp
Definition: Log.h:175
void FIX::ScreenLog::onEvent ( const std::string &  value)
inlinevirtual

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().

153  {
154  if ( !m_event ) return ;
155  Locker l( s_mutex );
156  m_time.setCurrent();
158  << ", " << m_prefix
159  << ", " << "event>" << std::endl
160  << " (" << value << ")" << std::endl;
161  }
bool m_event
Definition: Log.h:173
static Mutex s_mutex
Definition: Log.h:174
static std::string convert(const UtcTimeStamp &value, bool showMilliseconds=false)
bool m_millisecondsInTimeStamp
Definition: Log.h:175
UtcTimeStamp m_time
Definition: Log.h:170
std::string m_prefix
Definition: Log.h:169
void FIX::ScreenLog::onIncoming ( const std::string &  value)
inlinevirtual

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().

131  {
132  if ( !m_incoming ) return ;
133  Locker l( s_mutex );
134  m_time.setCurrent();
136  << ", " << m_prefix
137  << ", " << "incoming>" << std::endl
138  << " (" << value << ")" << std::endl;
139  }
static Mutex s_mutex
Definition: Log.h:174
static std::string convert(const UtcTimeStamp &value, bool showMilliseconds=false)
bool m_incoming
Definition: Log.h:171
bool m_millisecondsInTimeStamp
Definition: Log.h:175
UtcTimeStamp m_time
Definition: Log.h:170
std::string m_prefix
Definition: Log.h:169
void FIX::ScreenLog::onOutgoing ( const std::string &  value)
inlinevirtual

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().

142  {
143  if ( !m_outgoing ) return ;
144  Locker l( s_mutex );
145  m_time.setCurrent();
147  << ", " << m_prefix
148  << ", " << "outgoing>" << std::endl
149  << " (" << value << ")" << std::endl;
150  }
static Mutex s_mutex
Definition: Log.h:174
static std::string convert(const UtcTimeStamp &value, bool showMilliseconds=false)
bool m_millisecondsInTimeStamp
Definition: Log.h:175
UtcTimeStamp m_time
Definition: Log.h:170
std::string m_prefix
Definition: Log.h:169
bool m_outgoing
Definition: Log.h:172
void FIX::ScreenLog::setMillisecondsInTimeStamp ( bool  value)
inline

Definition at line 165 of file Log.h.

References m_millisecondsInTimeStamp.

166  { m_millisecondsInTimeStamp = value; }
bool m_millisecondsInTimeStamp
Definition: Log.h:175

Member Data Documentation

bool FIX::ScreenLog::m_event
private

Definition at line 173 of file Log.h.

Referenced by onEvent().

bool FIX::ScreenLog::m_incoming
private

Definition at line 171 of file Log.h.

Referenced by onIncoming().

bool FIX::ScreenLog::m_millisecondsInTimeStamp
private
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
staticprivate

Definition at line 174 of file Log.h.

Referenced by onEvent(), onIncoming(), and onOutgoing().


The documentation for this class was generated from the following files:

Generated on Sat Mar 29 2014 15:13:34 for QuickFIX by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2001