|
Lumiverse
2.5
A framework for creating lighting control applications
|
Logging interface. More...
Functions | |
| void | setLogFile (string name) |
| Open a log file for writing to instead of writing to stdout. More... | |
| string | printTime () |
| Sticks the current time and date into a string. More... | |
| string | printLevel (LOG_LEVEL level) |
| Translates the log level to a string. More... | |
| void | log (LOG_LEVEL level, string message) |
| Logs a meesage to the output file. More... | |
| void | setLogLevel (LOG_LEVEL level) |
| Sets the logLevel. More... | |
Variables | |
| mutex | logMutex |
| static unsigned int | logLevel = 0 |
| Sets the minimum logging level. More... | |
| static ofstream | logFile |
| Log file. More... | |
Logging interface.
Contains functions to help control and rout Lumiverse error and status messages.
| void Lumiverse::Logger::log | ( | LOG_LEVEL | level, |
| string | message | ||
| ) |
Logs a meesage to the output file.
Messages are formatted as: [LOG_LEVEL] Date Message
| level | Log message level |
| message | The message to put in the log |
| string Lumiverse::Logger::printLevel | ( | LOG_LEVEL | level | ) |
Translates the log level to a string.
| level | Log message level |
| string Lumiverse::Logger::printTime | ( | ) |
Sticks the current time and date into a string.
| void Lumiverse::Logger::setLogFile | ( | string | name | ) |
Open a log file for writing to instead of writing to stdout.
This will append to an existing file.
| name | Path to the file. Can be existing file or new file. |
| void Lumiverse::Logger::setLogLevel | ( | LOG_LEVEL | level | ) |
Sets the logLevel.
You could just set logLevel=[level] in plain code, but if you like functions better, here it is.
|
static |
Log file.
If not specified, this logs to stdout.
|
static |
Sets the minimum logging level.
If a message has a LOG_LEVEL less than the logLevel, it will not be output.
1.8.10