#include <debug.h>


It is an internal singleton, used by log_DBG_m and functions that control debugging process.
Definition at line 172 of file debug.h.
Public Member Functions | |
| log_Debugger (bool &m_active) | |
| virtual | ~log_Debugger () |
| Destructor automatically closes debugging file if debugging is still active at the end of the program execution. | |
| void | CloseF () |
| void | SetFileName (const cmn_Path &a_path) |
| void | On () |
| Turns on debugging and writes a file header. | |
| void | On (log_DbgLevel_t a_level, UInt32_t a_flags, const string &a_filename="") |
| void | SetArgs (char a_argLevel, const string &a_argFile, const string &a_argFlags) |
| void | Off () |
| void | SetLevel (log_DbgLevel_t a_level) |
| void | SetFlags (UInt32_t a_flags) |
| void | SetProcName (const char *a_procName) |
| log_DbgLevel_t | GetLevel () const |
| UInt32_t | GetFlags () const |
| string | GetArgLevel () const |
| string | GetArgFile () const |
| string | GetArgFlags () const |
| void | WriteHeader (ostringstream &a_dbgFormatted, log_DbgLevel_t a_level, const log_FunctionID &a_fcnID, long a_line) |
| Write header of the message based on previously set parameters. | |
| void | Write (log_DbgLevel_t a_level, ostringstream &a_dbgFormatted) |
| Writes the formatted debug text to output stream. | |
| void | SetExternalDebugger (void(*a_extDbgOn)(log_DbgLevel_t, bool a_verbose), void(*a_extDbgOff)()) |
Private Member Functions | |
| void | ChangeParams (log_DbgLevel_t a_level, UInt32_t a_flags, const string &a_filename) |
Private Attributes | |
| log_CLASSID_m | |
| cmn_Mutex | m_onOff_x |
| log_DbgLevel_t | m_level |
| UInt32_t | m_flags |
| bool & | m_active |
| string | m_procName |
| string | m_argLevel |
| string | m_argFile |
| string | m_argFlags |
| void(* | m_extDbgOn )(log_DbgLevel_t a_level, bool a_verbose) |
| Pointer to exteral function to turn on debugging (CORBA). | |
| void(* | m_extDbgOff )() |
| Pointer to exteral function to turn off debugging (CORBA). | |
Static Private Attributes | |
| static bool | m_created = false |
| Flag to guarantee singleton. | |
| log_Debugger::log_Debugger | ( | bool & | a_active | ) |
| ivd_Error(ie_SINGLETON_EXISTS,"",true) |
Definition at line 109 of file log_debugger.cpp.
References dbg_DETAIL, dbg_EXTAPI, dbg_LOW, dbg_NORM, ie_SINGLETON_EXISTS, IVD_COUT_LOG_m, ivd_Error, m_active, m_created, and s_levels.
00110 : log_File(false), 00111 m_level(dbg_NONE), 00112 m_flags(0), 00113 m_active(a_active), 00114 m_extDbgOn(NULL), 00115 m_extDbgOff(NULL) { 00116 00117 IVD_COUT_LOG_m(" log_Debugger::log_Debugger() " << boolalpha << m_active) 00118 00119 //cout << " log_Debugger::log_Debugger() " << boolalpha << m_active; 00120 00121 // Singleton check. 00122 if (m_created) { 00123 throw ivd_Error(ie_SINGLETON_EXISTS, "", true); 00124 } 00125 else { 00126 m_created = true; 00127 } 00128 s_levels[dbg_LOW] = 'L'; 00129 s_levels[dbg_NORM] = 'N'; 00130 s_levels[dbg_EXTAPI] = 'A'; 00131 s_levels[dbg_DETAIL] = 'D'; 00132 }
1.5.6