📄 nteventlogappender_8hh-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>log4cpp: NTEventLogAppender.hh Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div><div class="nav"><a class="el" href="dir_000001.html">include</a> / <a class="el" href="dir_000002.html">log4cpp</a></div><h1>NTEventLogAppender.hh</h1><a href="NTEventLogAppender_8hh.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>00002 <span class="comment"> * NTEventLogAppender.hh</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * See the COPYING file for the terms of usage and distribution.</span>00005 <span class="comment"> */</span>00006 00007 <span class="preprocessor">#ifndef _LOG4CPP_NTEVENTLOGAPPENDER_HH</span>00008 <span class="preprocessor"></span><span class="preprocessor">#define _LOG4CPP_NTEVENTLOGAPPENDER_HH</span>00009 <span class="preprocessor"></span>00010 <span class="preprocessor">#ifdef WIN32 // only available on Win32</span>00011 <span class="preprocessor"></span>00012 <span class="comment">// deal with ERROR #define</span>00013 <span class="comment">// N.B. This #includes windows.h with NOGDI and WIN32_LEAN_AND_MEAN #defined.</span>00014 <span class="comment">// If this is not what the user wants, #include windows.h before this file.</span>00015 <span class="preprocessor">#ifndef _WINDOWS_</span>00016 <span class="preprocessor"></span><span class="preprocessor"># ifndef NOGDI</span><a name="l00017"></a><a class="code" href="NTEventLogAppender_8hh.html#a0">00017</a> <span class="preprocessor"></span><span class="preprocessor"># define NOGDI // this will circumvent the ERROR #define in windows.h</span><a name="l00018"></a><a class="code" href="NTEventLogAppender_8hh.html#a1">00018</a> <span class="preprocessor"></span><span class="preprocessor"># define LOG4CPP_UNDEFINE_NOGDI</span>00019 <span class="preprocessor"></span><span class="preprocessor"># endif</span>00020 <span class="preprocessor"></span>00021 <span class="preprocessor"># ifndef WIN32_LEAN_AND_MEAN</span>00022 <span class="preprocessor"></span><span class="preprocessor"># define WIN32_LEAN_AND_MEAN</span><a name="l00023"></a><a class="code" href="NTEventLogAppender_8hh.html#a2">00023</a> <span class="preprocessor"></span><span class="preprocessor"># define LOG4CPP_UNDEFINE_WIN32_LEAN_AND_MEAN</span>00024 <span class="preprocessor"></span><span class="preprocessor"># endif</span>00025 <span class="preprocessor"></span>00026 <span class="preprocessor"># include <windows.h></span>00027 00028 <span class="preprocessor"># ifdef LOG4CPP_UNDEFINE_NOGDI</span>00029 <span class="preprocessor"></span><span class="preprocessor"># undef NOGDI</span>00030 <span class="preprocessor"></span><span class="preprocessor"># endif</span>00031 <span class="preprocessor"></span>00032 <span class="preprocessor"># ifdef LOG4CPP_UNDEFINE_WIN32_LEAN_AND_MEAN</span>00033 <span class="preprocessor"></span><span class="preprocessor"># undef WIN32_LEAN_AND_MEAN</span>00034 <span class="preprocessor"></span><span class="preprocessor"># endif</span>00035 <span class="preprocessor"></span>00036 <span class="preprocessor">#endif // done dealing with ERROR #define</span>00037 <span class="preprocessor"></span>00038 <span class="preprocessor">#include <<a class="code" href="Portability_8hh.html">log4cpp/Portability.hh</a>></span>00039 <span class="preprocessor">#include <<a class="code" href="AppenderSkeleton_8hh.html">log4cpp/AppenderSkeleton.hh</a>></span>00040 00041 <span class="keyword">namespace </span>log4cpp {00042 <a name="l00052"></a><a class="code" href="classlog4cpp_1_1NTEventLogAppender.html">00052</a> <span class="keyword">class </span><a class="code" href="Export_8hh.html#a0">LOG4CPP_EXPORT</a> NTEventLogAppender : <span class="keyword">public</span> <a class="code" href="classlog4cpp_1_1AppenderSkeleton.html">AppenderSkeleton</a> {00053 <span class="keyword">public</span>:00054 00060 NTEventLogAppender(<span class="keyword">const</span> std::string& name, <span class="keyword">const</span> std::string& sourceName);00061 <span class="keyword">virtual</span> ~NTEventLogAppender();00062 00066 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> reopen();00067 00068 <span class="keyword">virtual</span> <span class="keywordtype">void</span> close();00069 00074 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> requiresLayout() <span class="keyword">const</span>;00075 00076 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setLayout(<a class="code" href="classlog4cpp_1_1Layout.html">Layout</a>* layout);00077 00078 <span class="keyword">protected</span>:00079 00080 WORD getCategory(<a class="code" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> priority);00081 WORD getType(<a class="code" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> priority);00082 HKEY regGetKey(TCHAR *subkey, DWORD *disposition);00083 <span class="keywordtype">void</span> regSetString(HKEY hkey, TCHAR *name, TCHAR *value);00084 <span class="keywordtype">void</span> regSetDword(HKEY hkey, TCHAR *name, DWORD value);00085 <span class="keywordtype">void</span> addRegistryInfo(<span class="keyword">const</span> <span class="keywordtype">char</span> *source);00086 00087 <span class="keyword">virtual</span> <span class="keywordtype">void</span> open();00088 00093 <span class="keyword">virtual</span> <span class="keywordtype">void</span> _append(<span class="keyword">const</span> <a class="code" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a>& event);00094 <a name="l00095"></a><a class="code" href="classlog4cpp_1_1NTEventLogAppender.html#p0">00095</a> HANDLE _hEventSource;<a name="l00096"></a><a class="code" href="classlog4cpp_1_1NTEventLogAppender.html#p1">00096</a> std::string _strSourceName;00097 };00098 }00099 00100 <span class="preprocessor">#else // WIN32</span>00101 <span class="preprocessor"></span><span class="preprocessor">#error NTEventLoggAppender is not available on on Win32 platforms</span>00102 <span class="preprocessor"></span><span class="preprocessor">#endif // WIN32</span>00103 <span class="preprocessor"></span>00104 <span class="preprocessor">#endif // _LOG4CPP_NTEVENTLOGAPPENDER_HH</span>00105 <span class="preprocessor"></span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Jul 29 14:07:33 2005 for log4cpp by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -