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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>log4cpp: SyslogAppender.hh Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.2 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>File Members</span></a></li>
</ul>
</div>
<h1>SyslogAppender.hh</h1><a href="SyslogAppender_8hh.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * SyslogAppender.hh</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.</span>
<a name="l00005"></a>00005 <span class="comment"> * Copyright 2000, Bastiaan Bakker. All rights reserved.</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> * See the COPYING file for the terms of usage and distribution.</span>
<a name="l00008"></a>00008 <span class="comment"> */</span>
<a name="l00009"></a>00009
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef _LOG4CPP_SYSLOGAPPENDER_HH</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define _LOG4CPP_SYSLOGAPPENDER_HH</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include <<a class="code" href="Portability_8hh.html">log4cpp/Portability.hh</a>></span>
<a name="l00014"></a>00014 <span class="preprocessor">#include <string></span>
<a name="l00015"></a>00015 <span class="preprocessor">#include <stdarg.h></span>
<a name="l00016"></a>00016 <span class="preprocessor">#include <syslog.h></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include <<a class="code" href="LayoutAppender_8hh.html">log4cpp/LayoutAppender.hh</a>></span>
<a name="l00018"></a>00018 <span class="preprocessor">#include <<a class="code" href="Priority_8hh.html">log4cpp/Priority.hh</a>></span>
<a name="l00019"></a>00019
<a name="l00020"></a>00020 <span class="keyword">namespace </span>log4cpp {
<a name="l00021"></a>00021
<a name="l00025"></a><a class="code" href="classlog4cpp_1_1SyslogAppender.html">00025</a> <span class="keyword">class </span><a class="code" href="classlog4cpp_1_1SyslogAppender.html" title="SyslogAppender sends LoggingEvents to the local syslog system.">SyslogAppender</a> : <span class="keyword">public</span> <a class="code" href="classlog4cpp_1_1LayoutAppender.html" title="LayoutAppender is a common superclass for all Appenders that require a Layout.">LayoutAppender</a> {
<a name="l00026"></a>00026 <span class="keyword">public</span>:
<a name="l00027"></a>00027
<a name="l00033"></a>00033 <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classlog4cpp_1_1SyslogAppender.html#8e3264b37ebf7063cfba12b20418595d" title="Translates a log4cpp priority to a syslog priority.">toSyslogPriority</a>(<a class="code" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72" title="The type of Priority Values.">Priority::Value</a> priority);
<a name="l00034"></a>00034
<a name="l00044"></a>00044 <a class="code" href="classlog4cpp_1_1SyslogAppender.html#3dedc5cdf1dc8321649b0e58dd1d07b7" title="Instantiate a SyslogAppender with given name and name and facility for syslog.">SyslogAppender</a>(<span class="keyword">const</span> std::string& name, <span class="keyword">const</span> std::string& syslogName,
<a name="l00045"></a>00045 <span class="keywordtype">int</span> facility = <a class="code" href="RemoteSyslogAppender_8hh.html#06b118819bb5c938af93b79ebaf5be1f74f745c7f41cd9f3ab0da6d5adf9169b" title="random user-level messages">LOG_USER</a>);
<a name="l00046"></a>00046 <span class="keyword">virtual</span> <a class="code" href="classlog4cpp_1_1SyslogAppender.html#f1aef1edf10596dc2ab3e9cb14a2e6cb">~SyslogAppender</a>();
<a name="l00047"></a>00047
<a name="l00051"></a>00051 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlog4cpp_1_1SyslogAppender.html#85b701a0503050eabd5cca763bbf0b0c" title="Calls closelog(3) and openlog(3).">reopen</a>();
<a name="l00052"></a>00052
<a name="l00056"></a>00056 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlog4cpp_1_1SyslogAppender.html#add9fc06a928ae8f25a935217dda3aac" title="Calls closelog(3) to close the syslog file descriptor.">close</a>();
<a name="l00057"></a>00057
<a name="l00058"></a>00058 <span class="keyword">protected</span>:
<a name="l00059"></a>00059
<a name="l00063"></a>00063 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlog4cpp_1_1SyslogAppender.html#f88b6d06d8b864da3ddd41a15a99e8ba" title="Calls openlog(3).">open</a>();
<a name="l00064"></a>00064
<a name="l00069"></a>00069 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlog4cpp_1_1SyslogAppender.html#5a6d3f83e85c83f3105ad7829fe1d3c0" title="Sends a LoggingEvent to syslog.">_append</a>(<span class="keyword">const</span> <a class="code" href="structlog4cpp_1_1LoggingEvent.html" title="The internal representation of logging events.">LoggingEvent</a>& event);
<a name="l00070"></a>00070
<a name="l00071"></a><a class="code" href="classlog4cpp_1_1SyslogAppender.html#cbff484f670bcd3be1fb3275ba164be1">00071</a> <span class="keyword">const</span> std::string <a class="code" href="classlog4cpp_1_1SyslogAppender.html#cbff484f670bcd3be1fb3275ba164be1">_syslogName</a>;
<a name="l00072"></a><a class="code" href="classlog4cpp_1_1SyslogAppender.html#161acb9eb6afc9bcb939bab4d1e5f405">00072</a> <span class="keywordtype">int</span> <a class="code" href="classlog4cpp_1_1SyslogAppender.html#161acb9eb6afc9bcb939bab4d1e5f405">_facility</a>;
<a name="l00073"></a>00073 };
<a name="l00074"></a>00074 }
<a name="l00075"></a>00075
<a name="l00076"></a>00076 <span class="preprocessor">#endif // _LOG4CPP_SYSLOGAPPENDER_HH</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Sep 3 11:54:29 2007 for log4cpp by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
</body>
</html>
|