Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

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  *  $Id: Log_Msg_NT_Event_Log.h,v 1.1.1.2 2003/02/21 18:36:32 chad 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 (WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP)
00024 
00025 #include "ace/Log_Msg_Backend.h"
00026 
00027 /**
00028  * @class ACE_Log_Msg_NT_Event_Log
00029  *
00030  * @brief Implements an ACE_Log_Msg_Backend that logs to the WinNT system
00031  * event log.
00032  */
00033 class ACE_Export ACE_Log_Msg_NT_Event_Log : public ACE_Log_Msg_Backend
00034 {
00035 public:
00036   /// Constructor
00037   ACE_Log_Msg_NT_Event_Log (void);
00038 
00039   /// Destructor
00040   virtual ~ACE_Log_Msg_NT_Event_Log (void);
00041 
00042   /// Open a new event log.
00043   /**
00044    * Initialize the event logging facility.
00045    * @param logger_key The name of the calling program. This name is
00046    *                   used in the Source field of the event log. If
00047    *                   it is 0 (no name), the application name as
00048    *                   returned from ACE_Log_Msg::program_name() is used.
00049    */
00050   virtual int open (const ACE_TCHAR *logger_key);
00051 
00052   /// Reset the backend.
00053   virtual int reset (void);
00054 
00055   /// Close the backend completely.
00056   virtual int close (void);
00057 
00058   /// This is called when we want to log a message.
00059   virtual int log (ACE_Log_Record &log_record);
00060 
00061 private:
00062   HANDLE evlog_handle_;
00063 };
00064 
00065 #endif /* ACE_WIN32 && !ACE_HAS_WINCE && !ACE_HAS_PHARLAP */
00066 
00067 #include "ace/post.h"
00068 #endif /* ACE_LOG_MSG_NT_EVENT_LOG_H */

Generated on Mon Jun 16 11:20:00 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002