log4shib 2.0.1
Loading...
Searching...
No Matches
AppenderSkeleton.hh
Go to the documentation of this file.
1/*
2 * AppenderSkeleton.hh
3 *
4 * Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5 * Copyright 2001, Bastiaan Bakker. All rights reserved.
6 *
7 * See the COPYING file for the terms of usage and distribution.
8 */
9
10#ifndef _LOG4SHIB_APPENDERSKELETON_HH
11#define _LOG4SHIB_APPENDERSKELETON_HH
12
14#include <log4shib/Appender.hh>
15#include <log4shib/Filter.hh>
16
17namespace log4shib {
18
25 protected:
31 AppenderSkeleton(const std::string& name);
32
33 public:
37 virtual ~AppenderSkeleton();
38
43 virtual void doAppend(const LoggingEvent& event);
44
50 virtual bool reopen();
51
56 virtual void close() = 0;
57
63 virtual bool requiresLayout() const = 0;
64
69 virtual void setLayout(Layout* layout) = 0;
70
77 virtual void setThreshold(Priority::Value priority);
78
84
88 virtual void setFilter(Filter* filter);
89
94 virtual Filter* getFilter();
95
96 protected:
102 virtual void _append(const LoggingEvent& event) = 0;
103
104
105 private:
106 Priority::Value _threshold;
107 Filter* _filter;
108 };
109}
110
111#endif // _LOG4SHIB_APPENDERSKELETON_HH
#define LOG4SHIB_EXPORT
Definition Export.hh:11
virtual void doAppend(const LoggingEvent &event)
Log in Appender specific way.
Definition AppenderSkeleton.cpp:30
virtual Filter * getFilter()
Get the Filter for this appender.
Definition AppenderSkeleton.cpp:55
virtual bool requiresLayout() const =0
Check if the appender uses a layout.
virtual void close()=0
Release any resources allocated within the appender such as file handles, network connections,...
virtual void setFilter(Filter *filter)
Set a Filter for this appender.
Definition AppenderSkeleton.cpp:46
virtual bool reopen()
Reopens the output destination of this Appender, e.g.
Definition AppenderSkeleton.cpp:26
virtual void _append(const LoggingEvent &event)=0
Log in Appender specific way.
virtual void setLayout(Layout *layout)=0
Set the Layout for this appender.
AppenderSkeleton(const std::string &name)
Constructor for AppenderSkeleton.
Definition AppenderSkeleton.cpp:15
virtual void setThreshold(Priority::Value priority)
Set the threshold priority of this Appender.
Definition AppenderSkeleton.cpp:38
virtual Priority::Value getThreshold()
Get the threshold priority of this Appender.
Definition AppenderSkeleton.cpp:42
Appender(const std::string &name)
Constructor for Appender.
Definition Appender.cpp:70
Users should extend this class to implement customized logging event filtering.
Definition Filter.hh:49
Extend this abstract class to create your own log layout format.
Definition Layout.hh:22
int Value
The type of Priority Values.
Definition Priority.hh:84
The top level namespace for all 'Log for C++' types and classes.
Definition AbortAppender.hh:16
The internal representation of logging events.
Definition LoggingEvent.hh:32