#include <eventlog.h>
Definition at line 79 of file eventlog.h.
Public Member Functions | |
| log_EventLog (log_Component_e a_component, string a_qualifier="", bool a_silent=false) | |
| virtual | ~log_EventLog () |
| void | ChangeQualifier (string a_newQual) |
Private Attributes | |
| log_CLASSID_m | |
| bool | m_silent |
Static Private Attributes | |
| static bool | m_created = false |
| Flag to guarantee singleton. | |
| log_EventLog::log_EventLog | ( | log_Component_e | a_component, | |
| string | a_qualifier = "", |
|||
| bool | a_silent = false | |||
| ) |
| a_component | The ID of the component (executable ID). | |
| a_qualifier | [Optional] component's qualifier (partition name, library name, drive name...) | |
| a_silent | [Optional] Do not write start/stop messages |
Definition at line 55 of file log_eventlogger.cpp.
References ChangeQualifier(), cmn_Global::evt, g_cmn, ivd_Versions::GetProductVersion(), ie_SINGLETON_EXISTS, IVD_COUT_LOG_m, ivd_Error, log_FUNC_m, log_WriteEvent(), m_created, m_silent, and log_EventLogger::SetComponent().
00059 : 00060 m_silent(a_silent) { 00061 00062 IVD_COUT_LOG_m(" log_EventLog::log_EventLog " << " m_created = " << boolalpha << m_created) 00063 00064 log_FUNC_m(log_EventLog); 00065 00066 // Singleton check. 00067 if (m_created) { 00068 throw ivd_Error(ie_SINGLETON_EXISTS, "", true); 00069 } 00070 else { 00071 m_created = true; 00072 } 00073 00074 g_cmn.evt.SetComponent(a_component); 00075 ChangeQualifier(a_qualifier); 00076 00077 if (!m_silent) { 00078 ostringstream sstr; 00079 sstr << "Started (" << ivd_Versions::GetProductVersion() << ")."; 00080 log_WriteEvent(sstr.str()); 00081 } 00082 } //============================================================================//

| log_EventLog::~log_EventLog | ( | ) | [virtual] |
Definition at line 85 of file log_eventlogger.cpp.
References ivd_Versions::GetProductVersion(), IVD_COUT_LOG_m, log_FUNC_m, log_WriteEvent(), and m_silent.
00085 { 00086 IVD_COUT_LOG_m(" log_EventLog::~log_EventLog " ) 00087 log_FUNC_m(log_EventLog); 00088 00089 if (!m_silent) { 00090 ostringstream sstr; 00091 sstr << "Stopped (" << ivd_Versions::GetProductVersion() << ")."; 00092 log_WriteEvent(sstr.str()); 00093 } 00094 }

| void log_EventLog::ChangeQualifier | ( | string | a_newQual | ) |
Definition at line 97 of file log_eventlogger.cpp.
References cmn_Global::evt, g_cmn, and log_EventLogger::SetQualifier().
Referenced by fs_api::EventMounted(), and log_EventLog().
00097 { 00098 g_cmn.evt.SetQualifier(a_newQual); 00099 }


log_EventLog::log_CLASSID_m [private] |
Definition at line 97 of file eventlog.h.
bool log_EventLog::m_created = false [static, private] |
Flag to guarantee singleton.
Definition at line 100 of file eventlog.h.
Referenced by log_EventLog().
bool log_EventLog::m_silent [private] |
1.5.6