Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Log_Msg_Backend.h
bloba003f70cb6227c8375d70d8db3da05cb78993647
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Log_Msg_Backend.h
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
8 */
9 //=============================================================================
12 #ifndef ACE_LOG_MSG_BACKEND_H
13 #define ACE_LOG_MSG_BACKEND_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/ACE_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/os_include/sys/os_types.h"
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
26 class ACE_Log_Record;
28 /**
29 * @class ACE_Log_Msg_Backend
31 * @brief Defines the interface for ACE_Log_Msg back end processing.
33 * The ACE_Log_Msg class uses ACE_Log_Msg_Backend as the target interface
34 * for back end log record procesing. In addition to the classes ACE
35 * derives from this (ACE_Log_Msg_NT_Event_Log, ACE_Log_Msg_UNIX_Syslog, and
36 * ACE_Log_Msg_IPC) users can derive classes from ACE_Log_Msg_Backend for
37 * use as a custom logger back end.
39 class ACE_Export ACE_Log_Msg_Backend
41 public:
42 /// No-op virtual destructor.
43 virtual ~ACE_Log_Msg_Backend ();
45 /**
46 * Open the back end object. Perform any actions needed to prepare
47 * the object for later logging operations.
49 * @param logger_key The character string passed to ACE_Log_Msg::open().
50 * If the @c LOGGER logging destination is not being
51 * used, any string can be passed through to the back end.
53 * @retval 0 for success.
54 * @retval -1 for failure.
56 virtual int open (const ACE_TCHAR *logger_key) = 0;
58 /**
59 * Reset the backend. If ACE_Log_Msg is reopened during execution, this
60 * hook will be called. This method should perform any needed cleanup
61 * activity (similar to close()) because this object won't be reopened
62 * if the new open call does not specify use of this back end being reset.
64 * @retval Currently ignored, but to be safe, return 0 for success;
65 * -1 for failure.
67 virtual int reset () = 0;
69 /// Close the backend completely.
70 virtual int close () = 0;
72 /**
73 * Process a log record.
75 * @param log_record The ACE_Log_Record to process.
77 * @retval -1 for failure; else it is customarily the number of bytes
78 * processed, but can also be 0 to signify success.
80 virtual ssize_t log (ACE_Log_Record &log_record) = 0;
83 ACE_END_VERSIONED_NAMESPACE_DECL
85 #include /**/ "ace/post.h"
86 #endif /* ACE_LOG_MSG_BACKEND_H */