Use override/default for RTPortableServer
[ACE_TAO.git] / ACE / ace / Log_Msg_UNIX_Syslog.h
blobe5be52428bd716c5dd4f4cd8545a03fac5498b8f
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Log_Msg_UNIX_Syslog.h
7 * @author Jerry D. De Master <jdemaster@rite-solutions.com>
8 */
9 //=============================================================================
11 #ifndef ACE_LOG_MSG_UNIX_SYSLOG_H
12 #define ACE_LOG_MSG_UNIX_SYSLOG_H
13 #include /**/ "ace/pre.h"
15 #include /**/ "ace/config-all.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #if !defined (ACE_LACKS_UNIX_SYSLOG)
23 #include "ace/Log_Msg_Backend.h"
24 #include "ace/Basic_Types.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 /**
29 * @class ACE_Log_Msg_UNIX_Syslog
31 * @brief Implements an ACE_Log_Msg_Backend that logs messages to a UNIX
32 * system's syslog facility.
34 class ACE_Export ACE_Log_Msg_UNIX_Syslog : public ACE_Log_Msg_Backend
36 public:
37 /// Constructor
38 ACE_Log_Msg_UNIX_Syslog () = default;
40 /// Destructor
41 virtual ~ACE_Log_Msg_UNIX_Syslog ();
43 /// Open a new event log.
44 /**
45 * Initialize the event logging facility.
46 * @param logger_key The name of the calling program. This name is
47 * used as the @c ident in the syslog entries. If
48 * it is 0 (no name), the application name as
49 * returned from ACE_Log_Msg::program_name() is used.
51 virtual int open (const ACE_TCHAR *logger_key);
53 /// Reset the backend.
54 virtual int reset ();
56 /// Close the backend completely.
57 virtual int close ();
59 /// This is called when we want to log a message.
60 virtual ssize_t log (ACE_Log_Record &log_record);
62 private:
63 /// Convert an ACE_Log_Priority value to the corresponding syslog priority.
64 int convert_log_priority (ACE_UINT32 lm_priority);
66 /// Convert an ACE_Log_Priority mask to the corresponding syslog mask value.
67 int convert_log_mask (int lm_mask);
70 ACE_END_VERSIONED_NAMESPACE_DECL
72 #endif /* !ACE_LACKS_UNIX_SYSLOG */
74 #include /**/ "ace/post.h"
75 #endif /* ACE_LOG_MSG_UNIX_SYSLOG_H */