odtone::logger
// In header: </home/carlos/Projectos/odtone/inc/odtone/logger.hpp> class logger { public: // construct/copy/destruct logger(char const *const, logger &); logger(char const *const, std::ostream &); ~logger(); // public member functions void level(uint); uint level() const; std::ostream & sink() const; template<typename T1> void operator()(uint, const T1 &); template<typename T1, typename T2> void operator()(uint, const T1 &, const T2 &); template<typename T1, typename T2, typename T3> void operator()(uint, const T1 &, const T2 &, const T3 &); template<typename T1, typename T2, typename T3, typename T4> void operator()(uint, const T1 &, const T2 &, const T3 &, const T4 &); template<typename T1, typename T2, typename T3, typename T4, typename T5> void operator()(uint, const T1 &, const T2 &, const T3 &, const T4 &, const T5 &); template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> void operator()(uint, const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &); template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> void operator()(uint, const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &, const T7 &); template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> void operator()(uint, const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &, const T7 &, const T8 &); template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> void operator()(uint, const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &, const T7 &, const T8 &, const T9 &); template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10> void operator()(uint, const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &, const T7 &, const T8 &, const T9 &, const T10 &); };
Mechanism for debugging, which provides logging procedures to log messages for a specific system or application component. Logger names can be arbitrary strings, but they should be based on the application that invoke it. Each logger has a level associated with it. This reflects the maximum level that the logger cares about. So, if the logger level is set to 2 it only cares about log messages belonging to level 0, 1 and 2. It also has an std::ostream object associated with it, which defines how the logger writes and formats the output. The log messages can have up to 10 arguments.
logger
public
construct/copy/destructlogger(char const *const name, logger & log);
Construct a logger by copying it from another logger.
Parameters: |
|
logger(char const *const name, std::ostream & sink);
Construct a logger.
Parameters: |
|
~logger();
Destruct a logger.
logger
public member functionsvoid level(uint n);
Set the output level. Each logger has a level associated with it. This reflects the maximum level that the logger cares about. So, if the logger level is set to 2 it only cares about log messages belonging to level 0, 1 and 2.
Parameters: |
|
uint level() const;
Get the level configuration. Each logger has a level associated with it. This reflects the maximum level that the logger cares about. So, if the logger level is set to 2 it only cares about log messages belonging to level 0, 1 and 2.
Returns: |
The logger level. |
std::ostream & sink() const;
Get the std::ostream associated with the logger.
Returns: |
The std::ostream associated with the logger. |
template<typename T1> void operator()(uint level, const T1 & arg1);
XXX
template<typename T1, typename T2> void operator()(uint level, const T1 & arg1, const T2 & arg2);
template<typename T1, typename T2, typename T3> void operator()(uint level, const T1 & arg1, const T2 & arg2, const T3 & arg3);
template<typename T1, typename T2, typename T3, typename T4> void operator()(uint level, const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4);
template<typename T1, typename T2, typename T3, typename T4, typename T5> void operator()(uint level, const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4, const T5 & arg5);
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> void operator()(uint level, const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4, const T5 & arg5, const T6 & arg6);
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> void operator()(uint level, const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4, const T5 & arg5, const T6 & arg6, const T7 & arg7);
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> void operator()(uint level, const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4, const T5 & arg5, const T6 & arg6, const T7 & arg7, const T8 & arg8);
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> void operator()(uint level, const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4, const T5 & arg5, const T6 & arg6, const T7 & arg7, const T8 & arg8, const T9 & arg9);
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10> void operator()(uint level, const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4, const T5 & arg5, const T6 & arg6, const T7 & arg7, const T8 & arg8, const T9 & arg9, const T10 & arg10);