#include <Logging.h>
Public Member Functions | |
Logging () | |
void | Init (int level, long baud) |
void | Error (char *msg,...) |
void | Info (char *msg,...) |
void | Debug (char *msg,...) |
void | Verbose (char *msg,...) |
Private Member Functions | |
void | print (const char *format, va_list args) |
Private Attributes | |
int | _level |
long | _baud |
Depending on loglevel, source code is excluded from compile !
Wildcards
0 | LOG_LEVEL_NOOUTPUT | no output |
1 | LOG_LEVEL_ERRORS | only errors |
2 | LOG_LEVEL_INFOS | errors and info |
3 | LOG_LEVEL_DEBUG | errors, info and debug |
4 | LOG_LEVEL_VERBOSE | all |
01 FEB 2012 | initial release |
06 MAR 2012 | implement a preinstanciate object (like in Wire, ...) |
methode init get now loglevel and baud parameter |
Definition at line 71 of file Logging.h.
void Logging::Init | ( | int | level, | |
long | baud | |||
) |
Initializing, must be called as first.
void |
Definition at line 3 of file Logging.cpp.
References _baud, _level, LOG_LEVEL_NOOUTPUT, and LOG_LEVEL_VERBOSE.
void Logging::Error | ( | char * | msg, | |
... | ||||
) |
Output an error message. Output message contains ERROR: followed by original msg Error messages are printed out, at every loglevel except 0 ;-)
msg | format string to output | |
... | any number of variables |
Definition at line 9 of file Logging.cpp.
References _level, LOG_LEVEL_ERRORS, and print().
void Logging::Info | ( | char * | msg, | |
... | ||||
) |
Output an info message. Output message contains Info messages are printed out at l loglevels >= LOG_LEVEL_INFOS
msg | format string to output | |
... | any number of variables |
Definition at line 19 of file Logging.cpp.
References _level, LOG_LEVEL_INFOS, and print().
void Logging::Debug | ( | char * | msg, | |
... | ||||
) |
Output an debug message. Output message contains Debug messages are printed out at l loglevels >= LOG_LEVEL_DEBUG
msg | format string to output | |
... | any number of variables |
Definition at line 27 of file Logging.cpp.
References _level, LOG_LEVEL_DEBUG, and print().
void Logging::Verbose | ( | char * | msg, | |
... | ||||
) |
Output an verbose message. Output message contains Debug messages are printed out at l loglevels >= LOG_LEVEL_VERBOSE
msg | format string to output | |
... | any number of variables |
Definition at line 36 of file Logging.cpp.
References _level, LOG_LEVEL_VERBOSE, and print().
void Logging::print | ( | const char * | format, | |
va_list | args | |||
) | [private] |
int Logging::_level [private] |
long Logging::_baud [private] |