ILogMessages Class Reference
[InterfacesLog files and the pluggable logging systemProtected destructors on abstract base classes]

Inheritance diagram for ILogMessages:

Inheritance graph
[legend]

List of all members.


Detailed Description

An interface for logging messages. These can be debug trace messages or more structured logging. The messages are sent to a log, which can be pretty much anything.

Public Types

typedef unsigned long DataLength

Public Member Functions

virtual void SetThreadIdentifier (const std::string &identifier)=0
 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)=0
 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)=0
 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)=0
 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)=0
 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)=0
 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)=0
 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)=0
 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)=0
 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)=0
 Logs the message to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.

Protected Member Functions

 ~ILogMessages ()
 We never delete instances of this interface; you must manage the lifetime of the class that implements it.

Member Typedef Documentation

typedef unsigned long DataLength


Constructor & Destructor Documentation

~ILogMessages (  )  [inline, protected]

We never delete instances of this interface; you must manage the lifetime of the class that implements it.


Member Function Documentation

virtual void SetThreadIdentifier ( const std::string &  identifier  )  [pure 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.

Implemented in CAsyncFileLog, CRotatingAsyncFileLog, CMessageLog, CNullMessageLog, and CSimpleMessageLog.

virtual void SetThreadIdentifier ( const std::wstring &  identifier  )  [pure 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.

Implemented in CAsyncFileLog, CRotatingAsyncFileLog, CMessageLog, CNullMessageLog, and CSimpleMessageLog.

virtual void SetLogName ( const std::string &  name  )  [pure 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.

Implemented in CAsyncFileLog, CRotatingAsyncFileLog, CMessageLog, CNullMessageLog, and CSimpleMessageLog.

virtual void SetLogName ( const std::wstring &  name  )  [pure 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.

Implemented in CAsyncFileLog, CRotatingAsyncFileLog, CMessageLog, CNullMessageLog, and CSimpleMessageLog.

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

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

Implemented in CAsyncFileLog, CRotatingAsyncFileLog, CMessageLog, CNullMessageLog, and CSimpleMessageLog.

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

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

Implemented in CAsyncFileLog, CRotatingAsyncFileLog, CMessageLog, CNullMessageLog, and CSimpleMessageLog.

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

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

Implemented in CAsyncFileLog, CRotatingAsyncFileLog, CMessageLog, CNullMessageLog, and CSimpleMessageLog.

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

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

Implemented in CAsyncFileLog, CRotatingAsyncFileLog, CMessageLog, CNullMessageLog, and CSimpleMessageLog.

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

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

Implemented in CAsyncFileLog, CRotatingAsyncFileLog, CMessageLog, CNullMessageLog, and CSimpleMessageLog.

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

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

Implemented in CAsyncFileLog, CRotatingAsyncFileLog, CMessageLog, CNullMessageLog, and CSimpleMessageLog.


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