#include <scim_debug.h>
Public Member Functions | |
DebugOutput (uint32 mask=SCIM_DEBUG_AllMask, uint32 verbose=1) | |
Constructor. | |
template<typename T> | |
const DebugOutput & | operator<< (const T &t) const |
A template stream output operator. | |
Static Public Member Functions | |
static void | enable_debug (uint32 debug) |
The global method to enable the debug output. | |
static void | enable_debug_by_name (const String &debug) |
The global method to enable the debug output by their names. | |
static void | disable_debug (uint32 debug) |
Disable the debug type indicated by the given mask. | |
static void | disable_debug_by_name (const String &debug) |
Disable the debug type indicated by the given name. | |
static void | set_verbose_level (uint32 verbose) |
Set the debug verbose level. | |
static void | set_output (const String &file) |
Set the debug output file. | |
static String | serial_number () |
Constructor.
mask | - the debug filter mask. | |
verbose | - the verbose level of the debug message. |
const DebugOutput& scim::DebugOutput::operator<< | ( | const T & | t | ) | const [inline] |
A template stream output operator.
All kinds of data and variables can be output via DebugOutput by this operator.
static void scim::DebugOutput::enable_debug | ( | uint32 | debug | ) | [static] |
The global method to enable the debug output.
debug | - the mask to indicate which kind of debug should be enabled. |
static void scim::DebugOutput::enable_debug_by_name | ( | const String & | debug | ) | [static] |
The global method to enable the debug output by their names.
debug | - the name of the debug type to be enabled. The valid names are: all, main, config, imengine, backend, frontend, module, utility, iconv, lookuptable, socket. |
static void scim::DebugOutput::disable_debug | ( | uint32 | debug | ) | [static] |
Disable the debug type indicated by the given mask.
debug | - the mask of the debug type to be disabled. |
static void scim::DebugOutput::disable_debug_by_name | ( | const String & | debug | ) | [static] |
Disable the debug type indicated by the given name.
debug | - the name of the debug type to be disabled. |
static void scim::DebugOutput::set_verbose_level | ( | uint32 | verbose | ) | [static] |
Set the debug verbose level.
verbose | - the debug verbose level, 0 means no debug output. |
static void scim::DebugOutput::set_output | ( | const String & | file | ) | [static] |
Set the debug output file.
file | - the file to store the debug output. If equal to "stderr" or "cerr" then the debug output will be set to std:cerr. If equal to "stdout" or "cout" then the debug output will be set to std::cout. |
static String scim::DebugOutput::serial_number | ( | ) | [static] |