CSimpleMessageLog Class Reference
[Log files and the pluggable logging system]

Inheritance diagram for CSimpleMessageLog:

Inheritance graph
[legend]
Collaboration diagram for CSimpleMessageLog:

Collaboration graph
[legend]

List of all members.


Detailed Description

An object that implements ILogMessages and.


Public Types

enum  LogTargets { LogToCOUT = 0x0001, LogToOutputDebugString = 0x0010, LogToFile = 0x0100, LogToAll = 0x0111 }
typedef unsigned long DataLength

Public Member Functions

 CSimpleMessageLog ()
 CSimpleMessageLog (const _tstring &fileName, const LogTargets targets=LogToAll)
virtual void SetThreadIdentifier (const std::string &identifier)
 Sets the identifier used in the log for the current thread to the supplied string. The thread identifier defaults to the thread id in the form "XXX: ", the string supplied as an identifier does not need to include the ": " as this will be appended automatically. It can be any string that will help you to identify the thread concerned.
virtual void SetThreadIdentifier (const std::wstring &identifier)
 Sets the identifier used in the log for the current thread to the supplied string. The thread identifier defaults to the thread id in the form "XXX: ", the string supplied as an identifier does not need to include the ": " as this will be appended automatically. It can be any string that will help you to identify the thread concerned.
virtual void SetLogName (const std::string &name)
 Sets the name of the log file to the supplied name. Note that this creates a new log file with the specified name, it does NOT rename the existing log file. Note that you should manually synchronise access to this function and the various LogMessage and IWaitable calls.
virtual void SetLogName (const std::wstring &name)
 Sets the name of the log file to the supplied name. Note that this creates a new log file with the specified name, it does NOT rename the existing log file. Note that you should manually synchronise access to this function and the various LogMessage and IWaitable calls.
virtual void LogMessage (const std::string &message)
 Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.
virtual void LogMessage (const std::wstring &message)
 Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.
virtual void LogMessage (const char *const pString)
 Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.
virtual void LogMessage (const wchar_t *const pString)
 Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.
virtual void LogMessage (const char *const pString, const DataLength stringLength)
 Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.
virtual void LogMessage (const wchar_t *const pString, const DataLength stringLength)
 Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.


Member Typedef Documentation

typedef unsigned long DataLength [inherited]


Member Enumeration Documentation

enum LogTargets

Enumerator:
LogToCOUT 
LogToOutputDebugString 
LogToFile 
LogToAll 


Constructor & Destructor Documentation

CSimpleMessageLog (  ) 

CSimpleMessageLog ( const _tstring fileName,
const LogTargets  targets = LogToAll 
) [explicit]


Member Function Documentation

void SetThreadIdentifier ( const std::string &  identifier  )  [virtual]

Sets the identifier used in the log for the current thread to the supplied string. The thread identifier defaults to the thread id in the form "XXX: ", the string supplied as an identifier does not need to include the ": " as this will be appended automatically. It can be any string that will help you to identify the thread concerned.

Implements ILogMessages.

void SetThreadIdentifier ( const std::wstring &  identifier  )  [virtual]

Sets the identifier used in the log for the current thread to the supplied string. The thread identifier defaults to the thread id in the form "XXX: ", the string supplied as an identifier does not need to include the ": " as this will be appended automatically. It can be any string that will help you to identify the thread concerned.

Implements ILogMessages.

void SetLogName ( const std::string &  name  )  [virtual]

Sets the name of the log file to the supplied name. Note that this creates a new log file with the specified name, it does NOT rename the existing log file. Note that you should manually synchronise access to this function and the various LogMessage and IWaitable calls.

Implements ILogMessages.

void SetLogName ( const std::wstring &  name  )  [virtual]

Sets the name of the log file to the supplied name. Note that this creates a new log file with the specified name, it does NOT rename the existing log file. Note that you should manually synchronise access to this function and the various LogMessage and IWaitable calls.

Implements ILogMessages.

void LogMessage ( const std::string &  message  )  [virtual]

Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.

Implements ILogMessages.

void LogMessage ( const std::wstring &  message  )  [virtual]

Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.

Implements ILogMessages.

void LogMessage ( const char *const   pString  )  [virtual]

Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.

Implements ILogMessages.

void LogMessage ( const wchar_t *const   pString  )  [virtual]

Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.

Implements ILogMessages.

void LogMessage ( const char *const   pString,
const DataLength  stringLength 
) [virtual]

Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.

Implements ILogMessages.

void LogMessage ( const wchar_t *const   pString,
const DataLength  stringLength 
) [virtual]

Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.

Implements ILogMessages.


Generated on Mon Sep 7 14:10:35 2009 for JetByte Socket Tools - v6.1 by  doxygen 1.5.3