The C++ framework for developing highly scalable, high performance servers on Windows platforms.

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

Inheritance diagram for ILogMessages:

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
typedef std::vector
< std::string > 
VectorOfLines
 Logs the messages to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.
typedef std::deque
< std::string > 
DequeOfLines
 Logs the messages to the log. Note that you should manually synchronise access to this function and the various SetLogName calls.

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 VectorOfLines &messages)=0
virtual void LogMessage (const DequeOfLines &messages)=0
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 *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 *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 *pString, 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 *pString, 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

virtual ~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

typedef std::vector<std::string> VectorOfLines

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

typedef std::deque<std::string> DequeOfLines

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


Constructor & Destructor Documentation

virtual ~ILogMessages (  )  [protected, virtual]

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 CMemoryBasedMessageLog, CMessageLog, CNullMessageLog, CSimpleMessageLog, CAsyncFileLog, and CRotatingAsyncFileLog.

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 CMemoryBasedMessageLog, CMessageLog, CNullMessageLog, CSimpleMessageLog, CAsyncFileLog, and CRotatingAsyncFileLog.

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 CMemoryBasedMessageLog, CMessageLog, CNullMessageLog, CSimpleMessageLog, CAsyncFileLog, and CRotatingAsyncFileLog.

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 CMemoryBasedMessageLog, CMessageLog, CNullMessageLog, CSimpleMessageLog, CAsyncFileLog, and CRotatingAsyncFileLog.

virtual void LogMessage ( const VectorOfLines messages  )  [pure virtual]

virtual void LogMessage ( const DequeOfLines messages  )  [pure virtual]

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 CMemoryBasedMessageLog, CMessageLog, CNullMessageLog, CSimpleMessageLog, CAsyncFileLog, and CRotatingAsyncFileLog.

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 CMemoryBasedMessageLog, CMessageLog, CNullMessageLog, CSimpleMessageLog, CAsyncFileLog, and CRotatingAsyncFileLog.

virtual void LogMessage ( const char *  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 CMemoryBasedMessageLog, CMessageLog, CNullMessageLog, CSimpleMessageLog, CAsyncFileLog, and CRotatingAsyncFileLog.

virtual void LogMessage ( const wchar_t *  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 CMemoryBasedMessageLog, CMessageLog, CNullMessageLog, CSimpleMessageLog, CAsyncFileLog, and CRotatingAsyncFileLog.

virtual void LogMessage ( const char *  pString,
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.

virtual void LogMessage ( const wchar_t *  pString,
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.


Generated on Sun Sep 12 19:08:30 2021 for The Server Framework - v7.4 by doxygen 1.5.3