|
libcommonc++
0.7
|
A logger that writes to the console (the standard error stream). More...
#include <ConsoleLogger.h++>


Public Member Functions | |
| ConsoleLogger (const String &format="[%d %t] %@%m%.") | |
| Construct a new ConsoleLogger with the given log message format. More... | |
| ~ConsoleLogger () | |
| Destructor. More... | |
| void | setFormat (const String &format) |
| Set the log message format. More... | |
| void | log (LogLevel level, const char *file, int line, const char *message,...) |
| Log a message. More... | |
| void | vlog (LogLevel level, const char *file, int line, const char *message, va_list args) |
| Log a message. More... | |
| void | enableLogLevel (LogLevel level) |
| Enable a specific log level. More... | |
| void | disableLogLevel (LogLevel level) |
| Disable a specific log level. More... | |
| bool | isLogLevelEnabled (LogLevel level) const |
| Test if a specific log level is enabled. More... | |
| LogFormat & | getLogFormat () |
| Get the LogFormat used by this Logger. More... | |
Static Public Attributes | |
| static const size_t | LOG_BUFFER_SIZE = 1024 |
| The log buffer size. More... | |
Protected Member Functions | |
| virtual bool | write (CharBuffer &buffer) |
| Write a preformatted log message to the console. More... | |
A logger that writes to the console (the standard error stream).
| ConsoleLogger | ( | const String & | format = "[%d %t] %@%m%." | ) |
Construct a new ConsoleLogger with the given log message format.
| format | The log message format. |
| ~ConsoleLogger | ( | ) |
Destructor.
|
inherited |
Disable a specific log level.
| level | The level to disable. |
|
inherited |
Enable a specific log level.
| level | The level to enable. |
|
inherited |
Test if a specific log level is enabled.
|
inherited |
Log a message.
| level | The log level (severity). |
| file | The source filename. |
| line | The source file line number. |
| message | The log message. |
| ... | Optional message arguments. |
|
inherited |
Set the log message format.
| format | The log message format. |
|
inherited |
Log a message.
| level | The log level (severity). |
| file | The source filename. |
| line | The source file line number. |
| message | The log message. |
| args | Optional message arguments. |
|
protectedvirtual |
Write a preformatted log message to the console.
Implements Logger.
|
staticinherited |
The log buffer size.
Indicates the maximum length of a log message, in characters. Messages which exceed this length will be truncated.