B2BITS FIX Antenna HFT  1.0.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Utils::Log::LogSystem Class Reference

Log system manager. More...

#include <B2BITS_LogSystem.h>

Public Types

typedef std::map< std::string,
std::string > 
LogProperties
 

Public Member Functions

void attach (DeviceObserver *pObserver)
 Attaches Device Observer. More...
 
LogCategorycreateCategory (const std::string &name)
 Creates new category. More...
 
LogCategorycreateFakeCategory ()
 Creates new fake category. More...
 
void detach ()
 Detachs Device Observer. More...
 

Static Public Member Functions

static void create (const LogProperties &properties, DeviceObserver *pObserver=NULL)
 Creates and initializes log system. More...
 
static void create (const Utils::Properties *prop, DeviceObserver *pObserver=NULL)
 Creates and initializes log system. More...
 
static void create (const std::string &settingsFileName, DeviceObserver *pObserver=NULL)
 Creates and initializes log system. More...
 
static void create (std::istream &settings, DeviceObserver *pObserver=NULL)
 Creates and initializes log system. More...
 
static void destroy ()
 Destroys LogSystem instance. More...
 
static bool isCreated ()
 Returns true, if log system is initizlized. More...
 
static LogSystemsingleton ()
 Returns singleton. More...
 

Protected Member Functions

 LogSystem ()
 Constructor. More...
 
virtual ~LogSystem ()
 Destructor. More...
 

Detailed Description

Log system manager.

Acts as a factory and manager for the categories. Either LogSystem::create() or FixEngine::init() method must be called before usage.

Member Typedef Documentation

typedef std::map<std::string, std::string> Utils::Log::LogSystem::LogProperties

Constructor & Destructor Documentation

Utils::Log::LogSystem::LogSystem ( )
protected

Constructor.

virtual Utils::Log::LogSystem::~LogSystem ( )
protectedvirtual

Destructor.

Member Function Documentation

void Utils::Log::LogSystem::attach ( DeviceObserver *  pObserver)

Attaches Device Observer.

Parameters
pObserverdevice observer.
static void Utils::Log::LogSystem::create ( const LogProperties properties,
DeviceObserver *  pObserver = NULL 
)
static

Creates and initializes log system.

Parameters
settingsmap of property names and values. Cannot be NULL.
pObserverdevice observer.
Exceptions
Utils::Exceptionif input parameter is incorrect.
Note
If you are using this method to access logger before FixEngine::init call, FixEngine should be initialized with Engine::FixEngine::InitParameters::initUtilsLogger_ = false
See Also
Engine::FixEngine::InitParameters
Engine::FixEngine::init( Engine::FixEngine::InitParameters const& )
static void Utils::Log::LogSystem::create ( const Utils::Properties prop,
DeviceObserver *  pObserver = NULL 
)
static

Creates and initializes log system.

Parameters
propSet of properties. Cannot be NULL.
pObserverdevice observer.
Exceptions
Utils::Exceptionif input parameter is incorrect.
Note
If you are using this method to access logger before FixEngine::init call, FixEngine should be initialized with Engine::FixEngine::InitParameters::initUtilsLogger_ = false
See Also
Engine::FixEngine::InitParameters
Engine::FixEngine::init( Engine::FixEngine::InitParameters const& )
static void Utils::Log::LogSystem::create ( const std::string &  settingsFileName,
DeviceObserver *  pObserver = NULL 
)
static

Creates and initializes log system.

Parameters
settingsFileNamefile with properties. Cannot be NULL.
pObserverdevice observer.
Exceptions
Utils::Exceptionif input parameter is incorrect.
Note
If you are using this method to access logger before FixEngine::init call, FixEngine should be initialized with Engine::FixEngine::InitParameters::initUtilsLogger_ = false
See Also
Engine::FixEngine::InitParameters
Engine::FixEngine::init( Engine::FixEngine::InitParameters const& )
static void Utils::Log::LogSystem::create ( std::istream &  settings,
DeviceObserver *  pObserver = NULL 
)
static

Creates and initializes log system.

Parameters
settingsstream with properties. Cannot be NULL.
pObserverdevice observer.
Exceptions
Utils::Exceptionif input parameter is incorrect.
Note
If you are using this method to access logger before FixEngine::init call, FixEngine should be initialized with Engine::FixEngine::InitParameters::initUtilsLogger_ = false
See Also
Engine::FixEngine::InitParameters
Engine::FixEngine::init( Engine::FixEngine::InitParameters const& )
LogCategory* Utils::Log::LogSystem::createCategory ( const std::string &  name)

Creates new category.

Parameters
nameCategory name.
Exceptions
Utils::Exceptionif category properties are incorrect or none of the specified for this category devices are supported by the used platform.
LogCategory* Utils::Log::LogSystem::createFakeCategory ( )

Creates new fake category.

All its methods are empty.

static void Utils::Log::LogSystem::destroy ( )
static

Destroys LogSystem instance.

void Utils::Log::LogSystem::detach ( )

Detachs Device Observer.

static bool Utils::Log::LogSystem::isCreated ( )
static

Returns true, if log system is initizlized.

static LogSystem* Utils::Log::LogSystem::singleton ( )
static

Returns singleton.