This class
implements a Windows console Logger.
More...
#include "keyvalue/sys/logger/WindowsConsole.h"
Public Types | |
typedef LoggerImpl < keyvalue::logger::AddPrefix, keyvalue::logger::XtermColor, keyvalue::logger::ForwardToGlobalLogger > | MyBase_ |
typedef LoggerImpl< AddPrefix, XtermColor, ForwardToGlobalLogger > | LoggerImpl_ |
enum | Device { Console, File, Standard } |
Public Member Functions | |
WindowsConsole (unsigned int level, const string &title, const string &path) | |
unsigned int | getLevel () const |
Gets Logger's current level. | |
void | setLevel (unsigned int level) |
Sets Logger's current level. | |
bool | log (const Message &message) |
Logs a Message. | |
Protected Member Functions | |
bool | sendHeader () |
Sends the header message. | |
Private Member Functions | |
bool | send (const string &message) |
Sends a raw string message to the Logger's underlying device. | |
Private Attributes | |
HANDLE | childStdInWrite_ |
PROCESS_INFORMATION | childProcess_ |
This class
implements a Windows console Logger.
bool send | ( | const string & | message | ) | [private, virtual] |
Sends a raw string
message to the Logger's underlying device.
message | : Message to be sent. |
false
if it fails. Otherwise, it returns true
. Implements LoggerImpl< AddPrefix, XtermColor, ForwardToGlobalLogger >.
unsigned int getLevel | ( | ) | const [virtual, inherited] |
void setLevel | ( | unsigned int | level | ) | [virtual, inherited] |
bool log | ( | const Message & | message | ) | [virtual, inherited] |
Logs a Message.
This method may fail if the implemented Logger cannot process the message (e.g. a console Logger that has no longer a console window).
message | : Message to be logged. |
true
if it is successful. Implements Logger.
bool sendHeader | ( | ) | [protected, inherited] |
Sends the header message.
This method sends (throw send()) an opening header message to the underlying device of the Logger.