File: classlog4cpp_1_1OstreamAppender.html

package info (click to toggle)
log4cpp-doc 1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,528 kB
  • sloc: makefile: 10
file content (209 lines) | stat: -rw-r--r-- 13,782 bytes parent folder | download | duplicates (5)
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!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: log4cpp::OstreamAppender Class Reference</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&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<div class="nav">
<a class="el" href="namespacelog4cpp.html">log4cpp</a>::<a class="el" href="classlog4cpp_1_1OstreamAppender.html">OstreamAppender</a></div>
<h1>log4cpp::OstreamAppender Class Reference</h1><!-- doxytag: class="log4cpp::OstreamAppender" --><!-- doxytag: inherits="log4cpp::LayoutAppender" --><a class="el" href="classlog4cpp_1_1OstreamAppender.html" title="OstreamAppender appends LoggingEvents to ostreams.">OstreamAppender</a> appends LoggingEvents to ostreams.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="OstreamAppender_8hh-source.html">OstreamAppender.hh</a>&gt;</code>
<p>
Inheritance diagram for log4cpp::OstreamAppender:<p><center><img src="classlog4cpp_1_1OstreamAppender__inherit__graph.gif" border="0" usemap="#log4cpp_1_1OstreamAppender__inherit__map" alt="Inheritance graph"></center>
<map name="log4cpp_1_1OstreamAppender__inherit__map">
<area shape="rect" href="classlog4cpp_1_1LayoutAppender.html" title="LayoutAppender is a common superclass for all Appenders that require a Layout." alt="" coords="9,155,172,181"><area shape="rect" href="classlog4cpp_1_1AppenderSkeleton.html" title="AppenderSkeleton is a helper class, simplifying implementation of Appenders: it already..." alt="" coords="5,80,176,107"><area shape="rect" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements." alt="" coords="29,5,152,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for log4cpp::OstreamAppender:<p><center><img src="classlog4cpp_1_1OstreamAppender__coll__graph.gif" border="0" usemap="#log4cpp_1_1OstreamAppender__coll__map" alt="Collaboration graph"></center>
<map name="log4cpp_1_1OstreamAppender__coll__map">
<area shape="rect" href="classlog4cpp_1_1LayoutAppender.html" title="LayoutAppender is a common superclass for all Appenders that require a Layout." alt="" coords="172,277,335,304"><area shape="rect" href="classlog4cpp_1_1AppenderSkeleton.html" title="AppenderSkeleton is a helper class, simplifying implementation of Appenders: it already..." alt="" coords="45,187,216,213"><area shape="rect" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements." alt="" coords="25,96,148,123"><area shape="rect" href="classlog4cpp_1_1threading_1_1Mutex.html" title="log4cpp::threading::Mutex" alt="" coords="5,5,168,32"><area shape="rect" title="_appenderMapMutex" alt="" coords="83,28,91,36"><area shape="rect" title="_appenderMapMutex" alt="" coords="83,92,91,100"><area shape="rect" href="classlog4cpp_1_1Filter.html" title="Users should extend this class to implement customized logging event filtering." alt="" coords="172,96,271,123"><area shape="rect" title="_filter" alt="" coords="204,119,212,127"><area shape="rect" title="_filter" alt="" coords="140,183,148,191"><area shape="rect" title="_chainedFilter" alt="" coords="241,92,249,100"><area shape="rect" title="_chainedFilter" alt="" coords="241,119,249,127"><area shape="rect" href="classlog4cpp_1_1Layout.html" title="Extend this abstract class to create your own log layout format." alt="" coords="240,187,349,213"><area shape="rect" title="_layout" alt="" coords="284,209,292,217"><area shape="rect" title="_layout" alt="" coords="256,273,264,281"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cpp_1_1OstreamAppender-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1OstreamAppender.html#e699ca645f3b27706354aa608a357c46">OstreamAppender</a> (const std::string &amp;name, std::ostream *stream)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1OstreamAppender.html#2ce2cdcfd9d73d348447916e11636220">~OstreamAppender</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1OstreamAppender.html#283e524fdb7eab911c273b20619b09dd">reopen</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reopens the output destination of this <a class="el" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>, e.g.  <a href="#283e524fdb7eab911c273b20619b09dd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1OstreamAppender.html#6eca1004256920485cbc51fc0e8a7ac2">close</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release any resources allocated within the appender such as file handles, network connections, etc.  <a href="#6eca1004256920485cbc51fc0e8a7ac2"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1OstreamAppender.html#72115c5fabbef8687a2bc9f8b0ef6679">_append</a> (const <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> &amp;event)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Log in <a class="el" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a> specific way.  <a href="#72115c5fabbef8687a2bc9f8b0ef6679"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::ostream *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1OstreamAppender.html#cb5d44b2981342625c832992479e521e">_stream</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classlog4cpp_1_1OstreamAppender.html" title="OstreamAppender appends LoggingEvents to ostreams.">OstreamAppender</a> appends LoggingEvents to ostreams. 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="e699ca645f3b27706354aa608a357c46"></a><!-- doxytag: member="log4cpp::OstreamAppender::OstreamAppender" ref="e699ca645f3b27706354aa608a357c46" args="(const std::string &amp;name, std::ostream *stream)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log4cpp::OstreamAppender::OstreamAppender           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::ostream *&nbsp;</td>
          <td class="paramname"> <em>stream</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="2ce2cdcfd9d73d348447916e11636220"></a><!-- doxytag: member="log4cpp::OstreamAppender::~OstreamAppender" ref="2ce2cdcfd9d73d348447916e11636220" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log4cpp::OstreamAppender::~OstreamAppender           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="283e524fdb7eab911c273b20619b09dd"></a><!-- doxytag: member="log4cpp::OstreamAppender::reopen" ref="283e524fdb7eab911c273b20619b09dd" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool log4cpp::OstreamAppender::reopen           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Reopens the output destination of this <a class="el" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a>, e.g. 
<p>
the logfile or TCP socket. <dl class="return" compact><dt><b>Returns:</b></dt><dd>false if an error occured during reopening, true otherwise. </dd></dl>

<p>
Reimplemented from <a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#1f61281caac83409db298b681635e029">log4cpp::AppenderSkeleton</a>.
</div>
</div><p>
<a class="anchor" name="6eca1004256920485cbc51fc0e8a7ac2"></a><!-- doxytag: member="log4cpp::OstreamAppender::close" ref="6eca1004256920485cbc51fc0e8a7ac2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::OstreamAppender::close           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Release any resources allocated within the appender such as file handles, network connections, etc. 
<p>

<p>
Implements <a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#c62f94c6692fd146fcf37455d3e73439">log4cpp::AppenderSkeleton</a>.
</div>
</div><p>
<a class="anchor" name="72115c5fabbef8687a2bc9f8b0ef6679"></a><!-- doxytag: member="log4cpp::OstreamAppender::_append" ref="72115c5fabbef8687a2bc9f8b0ef6679" args="(const LoggingEvent &amp;event)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::OstreamAppender::_append           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>event</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Log in <a class="el" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a> specific way. 
<p>
Subclasses of <a class="el" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a> should implement this method to perform actual logging. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>event</em>&nbsp;</td><td>The <a class="el" href="structlog4cpp_1_1LoggingEvent.html" title="The internal representation of logging events.">LoggingEvent</a> to log. </td></tr>
  </table>
</dl>

<p>
Implements <a class="el" href="classlog4cpp_1_1AppenderSkeleton.html#643fb2614192ea09b502a3feb27abe66">log4cpp::AppenderSkeleton</a>.
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="cb5d44b2981342625c832992479e521e"></a><!-- doxytag: member="log4cpp::OstreamAppender::_stream" ref="cb5d44b2981342625c832992479e521e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream* <a class="el" href="classlog4cpp_1_1OstreamAppender.html#cb5d44b2981342625c832992479e521e">log4cpp::OstreamAppender::_stream</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="OstreamAppender_8hh-source.html">OstreamAppender.hh</a><li><a class="el" href="OstreamAppender_8cpp.html">OstreamAppender.cpp</a></ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Sep 3 11:55:05 2007 for log4cpp by&nbsp;
<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>