fintp_log
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FinTP::LogManager Class Reference

#include <LogManager.h>

Public Types

typedef WorkItemPool
< AppException
EventsPool
 

Public Member Functions

 ~LogManager ()
 

Static Public Member Functions

static void Publish (const AppException &except)
 
static void Publish (const string &message, const EventType::EventTypeEnum eventType=EventType::Error)
 
static void Publish (const char *message, const EventType::EventTypeEnum eventType=EventType::Error)
 
static void Publish (const std::exception &innerException, const EventType::EventTypeEnum eventType=EventType::Error, const string &message="")
 
static void Initialize (const NameValueCollection &applicationSettings, bool threaded=false)
 
static bool isInitialized ()
 
static void setCorrelationId (const string &value)
 
static void setSessionId (const string &value)
 
static void Terminate ()
 
static pthread_t getPublisherThreadId ()
 
static void Register (AbstractLogPublisher *logPublisher, bool isDefault)
 

Private Member Functions

 LogManager ()
 
void setThreaded (const bool threaded)
 
void setDefaultPublisher (AbstractLogPublisher *defaultPublisher)
 
void ClearPublishers ()
 
void InternalPublish (const AppException &except) throw ()
 
void InternalPublishProc (const AppException &except)
 

Static Private Member Functions

static void CreateKeys ()
 
static void DeleteCorrelIds (void *data)
 
static void * PublisherThread (void *param)
 

Private Attributes

bool m_Initialized
 
bool m_Threaded
 
pthread_t m_PublishThreadId
 
string m_SessionId
 
AbstractLogPublisherm_DefaultPublisher
 
vector< AbstractLogPublisher * > m_Publishers
 

Static Private Attributes

static LogManager Instance
 
static pthread_once_t KeysCreate = PTHREAD_ONCE_INIT
 
static pthread_key_t CorrelationKey
 
static pthread_mutex_t InstanceMutex = PTHREAD_MUTEX_INITIALIZER
 
static EventsPool m_EventsPool
 

Member Typedef Documentation

Constructor & Destructor Documentation

LogManager::~LogManager ( )
LogManager::LogManager ( )
private

Member Function Documentation

void LogManager::ClearPublishers ( )
private
void LogManager::CreateKeys ( )
staticprivate
void LogManager::DeleteCorrelIds ( void *  data)
staticprivate
pthread_t LogManager::getPublisherThreadId ( )
static
void LogManager::Initialize ( const NameValueCollection &  applicationSettings,
bool  threaded = false 
)
static
void LogManager::InternalPublish ( const AppException except) throw ()
private
void LogManager::InternalPublishProc ( const AppException except)
private
bool LogManager::isInitialized ( )
static
void LogManager::Publish ( const AppException except)
static
void LogManager::Publish ( const string &  message,
const EventType::EventTypeEnum  eventType = EventType::Error 
)
static
void LogManager::Publish ( const char *  message,
const EventType::EventTypeEnum  eventType = EventType::Error 
)
static
void LogManager::Publish ( const std::exception &  innerException,
const EventType::EventTypeEnum  eventType = EventType::Error,
const string &  message = "" 
)
static
void * LogManager::PublisherThread ( void *  param)
staticprivate
void LogManager::Register ( AbstractLogPublisher logPublisher,
bool  isDefault 
)
static
void LogManager::setCorrelationId ( const string &  value)
static
void LogManager::setDefaultPublisher ( AbstractLogPublisher defaultPublisher)
private
void LogManager::setSessionId ( const string &  value)
static
void LogManager::setThreaded ( const bool  threaded)
private
void LogManager::Terminate ( )
static

Member Data Documentation

pthread_key_t LogManager::CorrelationKey
staticprivate
LogManager LogManager::Instance
staticprivate
pthread_mutex_t LogManager::InstanceMutex = PTHREAD_MUTEX_INITIALIZER
staticprivate
pthread_once_t LogManager::KeysCreate = PTHREAD_ONCE_INIT
staticprivate
AbstractLogPublisher* FinTP::LogManager::m_DefaultPublisher
private
LogManager::EventsPool LogManager::m_EventsPool
staticprivate
bool FinTP::LogManager::m_Initialized
private
vector< AbstractLogPublisher* > FinTP::LogManager::m_Publishers
private
pthread_t FinTP::LogManager::m_PublishThreadId
private
string FinTP::LogManager::m_SessionId
private
bool FinTP::LogManager::m_Threaded
private

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