FIX::ScreenLog Class Reference

Screen based implementation of Log. More...

`#include <Log.h>`

Inheritance diagram for FIX::ScreenLog:
[legend]
Collaboration diagram for FIX::ScreenLog:
[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

## ScreenLog() [1/2]

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

inline

Definition at line 118 of file Log.h.

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

## ScreenLog() [2/2]

FIX::ScreenLog::ScreenLog | ( | const SessionID & | sessionID,
|  | bool | incoming,
|  | bool | outgoing,
|  | bool | event
| ) |  |

inline

Definition at line 122 of file Log.h.

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

## Member Function Documentation

## backup()

void FIX::ScreenLog::backup | ( |  | ) |

inline virtual

Implements FIX::Log.

Definition at line 128 of file Log.h.

{}

## clear()

void FIX::ScreenLog::clear | ( |  | ) |

inline virtual

Implements FIX::Log.

Definition at line 127 of file Log.h.

{}

## getMillisecondsInTimeStamp()

bool FIX::ScreenLog::getMillisecondsInTimeStamp | ( |  | ) | const

inline

Definition at line 163 of file Log.h.

{ return m_millisecondsInTimeStamp; }
FIX::ScreenLog::m_millisecondsInTimeStamp
bool m_millisecondsInTimeStamp
Definition: Log.h:175

## onEvent()

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

{
if ( !m_event ) return ;
Locker l( s_mutex );
m_time.setCurrent();
std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp)
<< ", " << m_prefix
<< ", " << "event>" << std::endl
<< " (" << value << ")" << std::endl;
}
FIX::ScreenLog::m_event
bool m_event
Definition: Log.h:173
FIX::ScreenLog::s_mutex
static Mutex s_mutex
Definition: Log.h:174
FIX::UtcTimeStampConvertor::convert
static std::string convert(const UtcTimeStamp &value, bool showMilliseconds=false)
Definition: FieldConvertors.h:566
FIX::ScreenLog::m_millisecondsInTimeStamp
bool m_millisecondsInTimeStamp
Definition: Log.h:175
FIX::ScreenLog::m_time
UtcTimeStamp m_time
Definition: Log.h:170
FIX::UtcTimeStamp::setCurrent
void setCurrent()
Definition: FieldTypes.h:427
FIX::ScreenLog::m_prefix
std::string m_prefix
Definition: Log.h:169

## onIncoming()

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

{
if ( !m_incoming ) return ;
Locker l( s_mutex );
m_time.setCurrent();
std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp)
<< ", " << m_prefix
<< ", " << "incoming>" << std::endl
<< " (" << value << ")" << std::endl;
}
FIX::ScreenLog::s_mutex
static Mutex s_mutex
Definition: Log.h:174
FIX::UtcTimeStampConvertor::convert
static std::string convert(const UtcTimeStamp &value, bool showMilliseconds=false)
Definition: FieldConvertors.h:566
FIX::ScreenLog::m_incoming
bool m_incoming
Definition: Log.h:171
FIX::ScreenLog::m_millisecondsInTimeStamp
bool m_millisecondsInTimeStamp
Definition: Log.h:175
FIX::ScreenLog::m_time
UtcTimeStamp m_time
Definition: Log.h:170
FIX::UtcTimeStamp::setCurrent
void setCurrent()
Definition: FieldTypes.h:427
FIX::ScreenLog::m_prefix
std::string m_prefix
Definition: Log.h:169

## onOutgoing()

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

{
if ( !m_outgoing ) return ;
Locker l( s_mutex );
m_time.setCurrent();
std::cout << "<" << UtcTimeStampConvertor::convert(m_time, m_millisecondsInTimeStamp)
<< ", " << m_prefix
<< ", " << "outgoing>" << std::endl
<< " (" << value << ")" << std::endl;
}
FIX::ScreenLog::s_mutex
static Mutex s_mutex
Definition: Log.h:174
FIX::UtcTimeStampConvertor::convert
static std::string convert(const UtcTimeStamp &value, bool showMilliseconds=false)
Definition: FieldConvertors.h:566
FIX::ScreenLog::m_millisecondsInTimeStamp
bool m_millisecondsInTimeStamp
Definition: Log.h:175
FIX::ScreenLog::m_time
UtcTimeStamp m_time
Definition: Log.h:170
FIX::UtcTimeStamp::setCurrent
void setCurrent()
Definition: FieldTypes.h:427
FIX::ScreenLog::m_prefix
std::string m_prefix
Definition: Log.h:169
FIX::ScreenLog::m_outgoing
bool m_outgoing
Definition: Log.h:172

## setMillisecondsInTimeStamp()

void FIX::ScreenLog::setMillisecondsInTimeStamp | ( | bool | value | ) |

inline

Definition at line 165 of file Log.h.

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

## Member Data Documentation

## m_event

bool FIX::ScreenLog::m_event

private

Definition at line 173 of file Log.h.

## m_incoming

bool FIX::ScreenLog::m_incoming

private

Definition at line 171 of file Log.h.

## m_millisecondsInTimeStamp

bool FIX::ScreenLog::m_millisecondsInTimeStamp

private

Definition at line 175 of file Log.h.

## m_outgoing

bool FIX::ScreenLog::m_outgoing

private

Definition at line 172 of file Log.h.

## m_prefix

std::string FIX::ScreenLog::m_prefix

private

Definition at line 169 of file Log.h.

## m_time

UtcTimeStamp FIX::ScreenLog::m_time

private

Definition at line 170 of file Log.h.

## s_mutex

Mutex FIX::ScreenLog::s_mutex

static private

Definition at line 174 of file Log.h.

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

- Log.h
- Log.cpp