#include <errorlog.h>


Internal singleton.
Definition at line 33 of file errorlog.h.
Public Member Functions | |
| log_ErrorStream () | |
| virtual | ~log_ErrorStream () |
| int | SetNewPath (void) |
| bool | IsBroken () const |
| string | GetHeader () const |
Private Attributes | |
| bool | m_broken |
Static Private Attributes | |
| static bool | m_created = false |
| Flag to guarantee singleton. | |
| log_ErrorStream::log_ErrorStream | ( | ) |
| ivd_Error(ie_SINGLETON_EXISTS,"",true) | ||
| ivd_SysError(errno,Trying to get ivd_STAT of log file.,true); |
Definition at line 58 of file log_errorlog.cpp.
References cmn_CreatePathNoException(), cmn_Global::dirs, g_cmn, ie_SINGLETON_EXISTS, IVD_COUT_LOG_m, ivd_Error, ivd_Directories::log, and m_created.
00059 : log_File(g_cmn.dirs.log + g_cmn.c_ErrorFileName), 00060 m_broken(false) { 00061 IVD_COUT_LOG_m(" log_ErrorStream::log_ErrorStream() ") 00062 00063 // Singleton check. 00064 if (m_created) { 00065 throw ivd_Error(ie_SINGLETON_EXISTS); 00066 } 00067 else { 00068 m_created = true; 00069 } 00070 00071 int result = cmn_CreatePathNoException(cmn_Path(g_cmn.dirs.log)); 00072 00073 if (result != 0) { 00074 cout 00075 << "** CRITICAL: log path can't be created: " << g_cmn.dirs.log << endl 00076 << "Errors will not be logged." << endl 00077 << "Error: " << result; 00078 } 00079 }

1.5.6