1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<html><head><meta name="robots" content="noindex">
3
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
4
<title>Appender.hh Source File</title>
5
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
</head><body bgcolor="#ffffff">
7
<!-- Generated by Doxygen 1.2.6 -->
9
<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">Compound List</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">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
10
<hr><h1>Appender.hh</h1><a href="Appender_hh.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
11
00002 <font class="comment"> * Appender.hh</font>
12
00003 <font class="comment"> *</font>
13
00004 <font class="comment"> * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.</font>
14
00005 <font class="comment"> * Copyright 2000, Bastiaan Bakker. All rights reserved.</font>
15
00006 <font class="comment"> *</font>
16
00007 <font class="comment"> * See the COPYING file for the terms of usage and distribution.</font>
17
00008 <font class="comment"> */</font>
19
00010 <font class="preprocessor">#ifndef _LOG4CPP_APPENDER_HH</font>
20
00011 <font class="preprocessor"></font><font class="preprocessor">#define _LOG4CPP_APPENDER_HH</font>
21
00012 <font class="preprocessor"></font>
22
00013 <font class="preprocessor">#include <string></font>
23
00014 <font class="preprocessor">#include <map></font>
24
00015 <font class="preprocessor">#include <stdarg.h></font>
25
00016 <font class="preprocessor">#include "<a class="code" href="Export_hh.html">log4cpp/Export.hh</a>"</font>
26
00017 <font class="preprocessor">#include "<a class="code" href="OstringStream_hh.html">log4cpp/OstringStream.hh</a>"</font>
27
00018 <font class="preprocessor">#include "<a class="code" href="Priority_hh.html">log4cpp/Priority.hh</a>"</font>
28
00019 <font class="preprocessor">#include "<a class="code" href="Layout_hh.html">log4cpp/Layout.hh</a>"</font>
29
00020 <font class="preprocessor">#include "<a class="code" href="LoggingEvent_hh.html">log4cpp/LoggingEvent.hh</a>"</font>
30
00021 <font class="preprocessor">#include "<a class="code" href="Filter_hh.html">log4cpp/Filter.hh</a>"</font>
31
00022 <font class="preprocessor">#include "<a class="code" href="Log4cppCleanup_hh.html">log4cpp/Log4cppCleanup.hh</a>"</font>
33
<a name="l00024"></a><a class="code" href="namespace_log4cpp.html">00024</a> <font class="keyword">namespace </font>log4cpp {
34
00025 <font class="keyword">class </font>LOG4CPP_EXPORT Category;
36
<a name="l00031"></a><a class="code" href="class_log4cpp__Appender.html">00031</a> <font class="keyword">class </font>LOG4CPP_EXPORT Appender {
37
00032 <font class="keyword">friend</font> <font class="keyword">class </font>log4cpp::Log4cppCleanup;
39
00034 <font class="keyword">public</font>:
41
00042 static Appender* getAppender(const std::string& name);
43
00048 static bool reopenAll();
45
00054 static void closeAll();
47
00056 <font class="keyword">protected</font>:
48
00062 Appender(const std::string& name);
50
00064 <font class="keyword">public</font>:
51
00068 <font class="keyword">virtual</font> ~Appender();
53
00074 <font class="keyword">virtual</font> void doAppend(const LoggingEvent& event) = 0;
55
00081 <font class="keyword">virtual</font> bool reopen() = 0;
57
00087 <font class="keyword">virtual</font> void close() = 0;
59
00094 <font class="keyword">virtual</font> bool requiresLayout() const = 0;
61
00100 <font class="keyword">virtual</font> void setLayout(Layout* layout) = 0;
63
<a name="l00106"></a><a class="code" href="class_log4cpp__Appender.html#a6">00106</a> inline const std::string& getName() const { <font class="keywordflow">return</font> _name; };
65
00114 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_log4cpp__Appender.html#a7">setThreshold</a>(Priority::Value priority) = 0;
67
00120 <font class="keyword">virtual</font> Priority::Value <a class="code" href="class_log4cpp__Appender.html#a8">getThreshold</a>() = 0;
69
00125 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_log4cpp__Appender.html#a9">setFilter</a>(Filter* filter) = 0;
71
00131 <font class="keyword">virtual</font> Filter* <a class="code" href="class_log4cpp__Appender.html#a10">getFilter</a>() = 0;
73
00133 <font class="keyword">private</font>:
74
00134 <font class="keyword">typedef</font> std::map<std::string, Appender*> AppenderMap;
76
00136 <font class="keyword">static</font> AppenderMap* _allAppenders;
77
00137 <font class="keyword">static</font> AppenderMap& _getAllAppenders();
78
00138 <font class="keyword">static</font> <font class="keywordtype">void</font> _deleteAllAppenders();
79
00139 <font class="keyword">static</font> <font class="keywordtype">void</font> _addAppender(Appender* appender);
80
00140 <font class="keyword">static</font> <font class="keywordtype">void</font> _removeAppender(Appender* appender);
81
00141 <font class="keyword">static</font> Log4cppCleanup& _fuckinDummy;
83
00143 <font class="keyword">const</font> std::string _name;
87
00147 <font class="preprocessor">#endif // _LOG4CPP_APPENDER_HH</font>
88
</font></pre></div><hr><address><small>Generated at Mon Jun 11 01:25:09 2001 for log4cpp by
89
<a href="http://www.doxygen.org/index.html">
90
<img src="doxygen.gif" alt="doxygen" align="middle" border=0
91
width=110 height=53></a>1.2.6 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
92
© 1997-2001</small></address>