BCLog Class Reference
A class for managing log messages. More...
#include <BCLog.h>
Public Types | |
enum | LogLevel { debug, detail, summary, warning, error, nothing } |
Enumerator for the amount of details to put into the log file. More... | |
Public Member Functions | |
Constructor and destructor | |
BCLog () | |
Constructor. More... | |
Static Public Member Functions | |
Getters | |
static BCLog::LogLevel | GetLogLevelFile () |
Returns the minimum log level for file output. More... | |
static BCLog::LogLevel | GetLogLevelScreen () |
Returns the minimum log level for screen output. More... | |
static bool | GetPrefix () |
Returns true if the loglevel is prefixed to every message. More... | |
Setters | |
static void | SetLogLevelFile (BCLog::LogLevel loglevel) |
Sets the minimum log level for file output. More... | |
static void | SetLogLevelScreen (BCLog::LogLevel loglevel) |
Sets the minimum log level for screen output. More... | |
static void | SetLogLevel (BCLog::LogLevel loglevelfile, BCLog::LogLevel loglevelscreen) |
Sets the minimum log level for file and screen output. More... | |
static void | SetLogLevel (BCLog::LogLevel loglevel) |
Sets the minimum log level for file and screen output. More... | |
static void | SetPrefix (bool flag) |
Toggle if the loglevel is prefixed to every message. More... | |
Miscellaneous | |
static void | OpenLog (const std::string &filename="log.txt", BCLog::LogLevel loglevelfile=BCLog::debug, BCLog::LogLevel loglevelscreen=BCLog::summary) |
Opens log file and sets minimum log levels for file and screen output. More... | |
static bool | IsOpen () |
static void | CloseLog () |
Closes the log file. | |
static void | Out (BCLog::LogLevel loglevelfile, BCLog::LogLevel loglevelscreen, const std::string &message) |
Writes string to the file and screen log if the log level is equal or greater than the minimum. More... | |
static void | Out (const std::string &message) |
static void | Out (BCLog::LogLevel loglevel, const std::string &message) |
static void | OutError (const std::string &message) |
static void | OutWarning (const std::string &message) |
static void | OutSummary (const std::string &message) |
static void | OutDetail (const std::string &message) |
static void | OutDebug (const std::string &message) |
static void | StartupInfo () |
Writes startup information onto screen and into a logfile. | |
static const std::string & | GetVersion () |
static std::string | ToString (BCLog::LogLevel) |
Converts a log level to a string. | |
Detailed Description
A class for managing log messages.
- Version
- 1.0
- Date
- 08.2008
This class manages log messages for printing on the screen and into a log file
Member Enumeration Documentation
enum BCLog::LogLevel |
Enumerator for the amount of details to put into the log file.
Constructor & Destructor Documentation
Member Function Documentation
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
The documentation for this class was generated from the following files: