Log Class Reference
Application logger.
More...
#include <Log.hh>
List of all members.
Public Member Functions |
| void | setVerboseLevel (int level) |
| | Enable the specified level of verbosity.
|
| void | setVerboseLevel (int level, const std::string &modname) |
| | Enable the specified level of verbosity for the specified module.
|
| void | setVerboseMask (int mask) |
| | Directly change the verbosity mask.
|
|
void | setOutputFile (const std::string &filename) |
| | Filename to log into (default is stderr).
|
| void | setPrintModule (bool enable=true) |
| | Pretty print module name before each line (use the define MODULE_NAME).
|
|
void | setPrintFunc (bool enable=true) |
| | Print function name to easily find the LOG macro.
|
|
void | setPrintTimestamp (bool enable=true) |
| | Add timestamp in [sss.mmm] format before each line.
|
|
void | setUseColor (bool enable=true) |
| | Enable or disable color (by default use it).
|
|
std::ostream & | getStream () |
| | Used internally.
|
|
void | logPrefix (const char *modname, const char *modcolor, const char *funcname, int level) |
| | Used internally.
|
|
int | getVerboseMask (const char *modname) const |
| | Used internally.
|
Static Public Member Functions |
|
static Log * | getDefaultInst () |
| | Get defaut logger instance.
|
Detailed Description
Application logger.
- Author:
- victor
- Date:
- 21/01/2006
Member Function Documentation
| void Log::setPrintModule |
( |
bool |
enable = true |
) |
|
Pretty print module name before each line (use the define MODULE_NAME).
| void Log::setVerboseLevel |
( |
int |
level, |
|
|
const std::string & |
modname | |
|
) |
| | |
Enable the specified level of verbosity for the specified module.
- Parameters:
-
| level | Activate all levels from 0 up to level (0-31) for this module. |
| modname | Name of the module to change the level of verbosity. |
| void Log::setVerboseLevel |
( |
int |
level |
) |
|
Enable the specified level of verbosity.
- Parameters:
-
| level | Activate all levels from 0 up to level (0-31). |
| void Log::setVerboseMask |
( |
int |
mask |
) |
|
Directly change the verbosity mask.
- Parameters:
-
| mask | The mask to apply (eg: 0x06 activate level 1 and 2, but not level 0). |
- Note:
- This function is mostly useless, only using
setVerboseLevel is fine.
The documentation for this class was generated from the following files: