WindowsConsole Class Reference

This class implements a Windows console Logger. More...

#include "keyvalue/sys/logger/WindowsConsole.h"

Inheritance diagram for WindowsConsole:
Inheritance graph
[legend]

List of all members.

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_

Detailed Description

This class implements a Windows console Logger.


Member Function Documentation

bool send ( const string &  message  )  [private, virtual]

Sends a raw string message to the Logger's underlying device.

Parameters:
message : Message to be sent.
Returns:
This method returns false if it fails. Otherwise, it returns true.

Implements LoggerImpl< AddPrefix, XtermColor, ForwardToGlobalLogger >.

unsigned int getLevel (  )  const [virtual, inherited]

Gets Logger's current level.

Returns:
The level.

Implements Logger.

void setLevel ( unsigned int  level  )  [virtual, inherited]

Sets Logger's current level.

Parameters:
level : New level.

Implements Logger.

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).

Parameters:
message : Message to be logged.
Returns:
This method returns 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.

Returns:
This method returns what print() does.

Generated on Sat Mar 20 15:08:31 2010 for KeyValue by  doxygen 1.6.1