Log_Msg_NT_Event_Log.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Log_Msg_NT_Event_Log.h
00006  *
00007  *  Log_Msg_NT_Event_Log.h,v 4.8 2005/10/28 16:14:53 ossama Exp
00008  *
00009  *  @author Christopher Kohlhoff <chris@kohlhoff.com>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef ACE_LOG_MSG_NT_EVENT_LOG_H
00014 #define ACE_LOG_MSG_NT_EVENT_LOG_H
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "ace/config-all.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #if defined ACE_HAS_LOG_MSG_NT_EVENT_LOG
00024 
00025 #include "ace/Log_Msg_Backend.h"
00026 
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 /**
00030  * @class ACE_Log_Msg_NT_Event_Log
00031  *
00032  * @brief Implements an ACE_Log_Msg_Backend that logs to the WinNT system
00033  * event log.
00034  */
00035 class ACE_Export ACE_Log_Msg_NT_Event_Log : public ACE_Log_Msg_Backend
00036 {
00037 public:
00038   /// Constructor
00039   ACE_Log_Msg_NT_Event_Log (void);
00040 
00041   /// Destructor
00042   virtual ~ACE_Log_Msg_NT_Event_Log (void);
00043 
00044   /// Open a new event log.
00045   /**
00046    * Initialize the event logging facility.
00047    * @param logger_key The name of the calling program. This name is
00048    *                   used in the Source field of the event log. If
00049    *                   it is 0 (no name), the application name as
00050    *                   returned from ACE_Log_Msg::program_name() is used.
00051    */
00052   virtual int open (const ACE_TCHAR *logger_key);
00053 
00054   /// Reset the backend.
00055   virtual int reset (void);
00056 
00057   /// Close the backend completely.
00058   virtual int close (void);
00059 
00060   /// This is called when we want to log a message.
00061   virtual int log (ACE_Log_Record &log_record);
00062 
00063 private:
00064   HANDLE evlog_handle_;
00065 };
00066 
00067 ACE_END_VERSIONED_NAMESPACE_DECL
00068 
00069 #endif /* ACE_HAS_LOG_MSG_NT_EVENT_LOG */
00070 
00071 #include /**/ "ace/post.h"
00072 #endif /* ACE_LOG_MSG_NT_EVENT_LOG_H */

Generated on Thu Nov 9 09:41:53 2006 for ACE by doxygen 1.3.6