ACE 6.0.4
Public Member Functions
ACE_Log_Msg_Backend Class Reference

Defines the interface for ACE_Log_Msg back end processing. More...

#include <Log_Msg_Backend.h>

Inheritance diagram for ACE_Log_Msg_Backend:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~ACE_Log_Msg_Backend (void)
 No-op virtual destructor.
virtual int open (const ACE_TCHAR *logger_key)=0
virtual int reset (void)=0
virtual int close (void)=0
 Close the backend completely.
virtual ssize_t log (ACE_Log_Record &log_record)=0

Detailed Description

Defines the interface for ACE_Log_Msg back end processing.

The ACE_Log_Msg class uses ACE_Log_Msg_Backend as the target interface for back end log record procesing. In addition to the classes ACE derives from this (ACE_Log_Msg_NT_Event_Log, ACE_Log_Msg_UNIX_Syslog, and ACE_Log_Msg_IPC) users can derive classes from ACE_Log_Msg_Backend for use as a custom logger back end.


Constructor & Destructor Documentation

ACE_Log_Msg_Backend::~ACE_Log_Msg_Backend ( void  ) [virtual]

No-op virtual destructor.


Member Function Documentation

virtual int ACE_Log_Msg_Backend::close ( void  ) [pure virtual]

Close the backend completely.

Implemented in ACE_Log_Msg_IPC, ACE_Log_Msg_NT_Event_Log, and ACE_Log_Msg_UNIX_Syslog.

virtual ssize_t ACE_Log_Msg_Backend::log ( ACE_Log_Record log_record) [pure virtual]

Process a log record.

Parameters:
log_recordThe ACE_Log_Record to process.
Return values:
-1for failure; else it is customarily the number of bytes processed, but can also be 0 to signify success.

Implemented in ACE_Log_Msg_IPC, ACE_Log_Msg_NT_Event_Log, and ACE_Log_Msg_UNIX_Syslog.

virtual int ACE_Log_Msg_Backend::open ( const ACE_TCHAR logger_key) [pure virtual]

Open the back end object. Perform any actions needed to prepare the object for later logging operations.

Parameters:
logger_keyThe character string passed to ACE_Log_Msg::open(). If the LOGGER logging destination is not being used, any string can be passed through to the back end.
Return values:
0for success.
-1for failure.

Implemented in ACE_Log_Msg_IPC, ACE_Log_Msg_NT_Event_Log, and ACE_Log_Msg_UNIX_Syslog.

virtual int ACE_Log_Msg_Backend::reset ( void  ) [pure virtual]

Reset the backend. If ACE_Log_Msg is reopened during execution, this hook will be called. This method should perform any needed cleanup activity (similar to close()) because this object won't be reopened if the new open call does not specify use of this back end being reset.

Return values:
Currentlyignored, but to be safe, return 0 for success; -1 for failure.

Implemented in ACE_Log_Msg_IPC, ACE_Log_Msg_NT_Event_Log, and ACE_Log_Msg_UNIX_Syslog.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines