1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
<!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: RemoteSyslogAppender.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>RemoteSyslogAppender.hh</h1><a href="RemoteSyslogAppender_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"> * SyslogAppender.hh</span>
00003 <span class="comment"> *</span>
00004 <span class="comment"> * Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.</span>
00005 <span class="comment"> * Copyright 2001, Walter Stroebel. All rights reserved.</span>
00006 <span class="comment"> *</span>
00007 <span class="comment"> * See the COPYING file for the terms of usage and distribution.</span>
00008 <span class="comment"> */</span>
00009
00010 <span class="preprocessor">#ifndef _LOG4CPP_REMOTESYSLOGAPPENDER_HH</span>
00011 <span class="preprocessor"></span><span class="preprocessor">#define _LOG4CPP_REMOTESYSLOGAPPENDER_HH</span>
00012 <span class="preprocessor"></span>
00013 <span class="preprocessor">#include <<a class="code" href="Portability_8hh.html">log4cpp/Portability.hh</a>></span>
00014 <span class="preprocessor">#include <string></span>
00015 <span class="preprocessor">#include <stdarg.h></span>
00016 <span class="preprocessor">#include <<a class="code" href="LayoutAppender_8hh.html">log4cpp/LayoutAppender.hh</a>></span>
00017 <span class="preprocessor">#include <<a class="code" href="Priority_8hh.html">log4cpp/Priority.hh</a>></span>
00018 <span class="preprocessor">#ifdef WIN32</span>
00019 <span class="preprocessor"></span><span class="preprocessor">#include <winsock2.h></span>
00020 <span class="preprocessor">#else</span>
00021 <span class="preprocessor"></span><span class="preprocessor">#include <netinet/in.h></span>
00022 <span class="preprocessor">#endif</span>
00023 <span class="preprocessor"></span>
00024 <span class="preprocessor">#ifdef LOG4CPP_HAVE_SYSLOG</span>
00025 <span class="preprocessor"></span><span class="preprocessor">#include <syslog.h></span>
00026 <span class="preprocessor">#else</span>
00027 <span class="preprocessor"></span>
<a name="l00028"></a><a class="code" href="RemoteSyslogAppender_8hh.html#a28">00028</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
00029 <a class="code" href="RemoteSyslogAppender_8hh.html#a28a0">LOG_EMERG</a> = 0,
00030 <a class="code" href="RemoteSyslogAppender_8hh.html#a28a1">LOG_ALERT</a> = 1,
00031 <a class="code" href="RemoteSyslogAppender_8hh.html#a28a2">LOG_CRIT</a> = 2,
00032 <a class="code" href="RemoteSyslogAppender_8hh.html#a28a3">LOG_ERR</a> = 3,
00033 <a class="code" href="RemoteSyslogAppender_8hh.html#a28a4">LOG_WARNING</a> = 4,
00034 <a class="code" href="RemoteSyslogAppender_8hh.html#a28a5">LOG_NOTICE</a> = 5,
00035 <a class="code" href="RemoteSyslogAppender_8hh.html#a28a6">LOG_INFO</a> = 6,
00036 <a class="code" href="RemoteSyslogAppender_8hh.html#a28a7">LOG_DEBUG</a> = 7,
00037 } <a class="code" href="RemoteSyslogAppender_8hh.html#a28">SyslogLevel</a>;
00038
<a name="l00039"></a><a class="code" href="RemoteSyslogAppender_8hh.html#a29">00039</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
00040 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a8">LOG_KERN</a> = (0<<3),
00041 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a9">LOG_USER</a> = (1<<3),
00042 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a10">LOG_MAIL</a> = (2<<3),
00043 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a11">LOG_DAEMON</a> = (3<<3),
00044 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a12">LOG_AUTH</a> = (4<<3),
00045 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a13">LOG_SYSLOG</a> = (5<<3),
00046 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a14">LOG_LPR</a> = (6<<3),
00047 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a15">LOG_NEWS</a> = (7<<3),
00048 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a16">LOG_UUCP</a> = (8<<3),
00049 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a17">LOG_CRON</a> = (9<<3),
00050 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a18">LOG_AUTHPRIV</a> = (10<<3),
00051 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a19">LOG_FTP</a> = (11<<3),
00052
00053 <span class="comment">/* other codes through 15 reserved for system use */</span>
00054 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a20">LOG_LOCAL0</a> = (16<<3),
00055 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a21">LOG_LOCAL1</a> = (17<<3),
00056 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a22">LOG_LOCAL2</a> = (18<<3),
00057 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a23">LOG_LOCAL3</a> = (19<<3),
00058 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a24">LOG_LOCAL4</a> = (20<<3),
00059 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a25">LOG_LOCAL5</a> = (21<<3),
00060 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a26">LOG_LOCAL6</a> = (22<<3),
00061 <a class="code" href="RemoteSyslogAppender_8hh.html#a29a27">LOG_LOCAL7</a> = (23<<3),
00062 } <a class="code" href="RemoteSyslogAppender_8hh.html#a29">SyslogFacility</a>;
00063 <span class="preprocessor">#endif</span>
00064 <span class="preprocessor"></span>
00065 <span class="keyword">namespace </span>log4cpp {
00066
<a name="l00072"></a><a class="code" href="classlog4cpp_1_1RemoteSyslogAppender.html">00072</a> <span class="keyword">class </span><a class="code" href="Export_8hh.html#a0">LOG4CPP_EXPORT</a> RemoteSyslogAppender : <span class="keyword">public</span> <a class="code" href="classlog4cpp_1_1LayoutAppender.html">LayoutAppender</a> {
00073 <span class="keyword">public</span>:
00074
00080 <span class="keyword">static</span> <span class="keywordtype">int</span> toSyslogPriority(<a class="code" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> priority);
00081
00094 RemoteSyslogAppender(<span class="keyword">const</span> std::string& name,
00095 <span class="keyword">const</span> std::string& syslogName,
00096 <span class="keyword">const</span> std::string& relayer,
00097 <span class="keywordtype">int</span> facility = <a class="code" href="RemoteSyslogAppender_8hh.html#a29a9">LOG_USER</a>,
00098 <span class="keywordtype">int</span> portNumber = 514);
00099 <span class="keyword">virtual</span> ~RemoteSyslogAppender();
00100
00104 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> reopen();
00105
00109 <span class="keyword">virtual</span> <span class="keywordtype">void</span> close();
00110
00111 <span class="keyword">protected</span>:
00112
00116 <span class="keyword">virtual</span> <span class="keywordtype">void</span> open();
00117
00122 <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);
00123
<a name="l00124"></a><a class="code" href="classlog4cpp_1_1RemoteSyslogAppender.html#p0">00124</a> <span class="keyword">const</span> std::string _syslogName;
<a name="l00125"></a><a class="code" href="classlog4cpp_1_1RemoteSyslogAppender.html#p1">00125</a> <span class="keyword">const</span> std::string _relayer;
<a name="l00126"></a><a class="code" href="classlog4cpp_1_1RemoteSyslogAppender.html#p2">00126</a> <span class="keywordtype">int</span> _facility;
<a name="l00127"></a><a class="code" href="classlog4cpp_1_1RemoteSyslogAppender.html#p3">00127</a> <span class="keywordtype">int</span> _portNumber;
00128 <span class="preprocessor">#ifdef WIN32</span>
<a name="l00129"></a><a class="code" href="classlog4cpp_1_1RemoteSyslogAppender.html#p4">00129</a> <span class="preprocessor"></span> SOCKET _socket;
00130 <span class="preprocessor">#else </span>
00131 <span class="preprocessor"></span> <span class="keywordtype">int</span> _socket;
00132 <span class="preprocessor">#endif</span>
<a name="l00133"></a><a class="code" href="classlog4cpp_1_1RemoteSyslogAppender.html#p5">00133</a> <span class="preprocessor"></span> in_addr_t _ipAddr;
00134 <span class="keyword">private</span>:
00135 <span class="keywordtype">int</span> _cludge;
00136 };
00137 }
00138
00139 <span class="preprocessor">#endif // _LOG4CPP_REMOTESYSLOGAPPENDER_HH</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>
|