Loading...
Searching...
No Matches
AppenderSkeleton.hh
Go to the documentation of this file.
/*
* AppenderSkeleton.hh
*
* Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
* Copyright 2001, Bastiaan Bakker. All rights reserved.
*
* See the COPYING file for the terms of usage and distribution.
*/
#ifndef _LOG4SHIB_APPENDERSKELETON_HH
#define _LOG4SHIB_APPENDERSKELETON_HH
#include <log4shib/Portability.hh>
#include <log4shib/Appender.hh>
#include <log4shib/Filter.hh>
namespace log4shib {
class LOG4SHIB_EXPORT AppenderSkeleton : public Appender {
protected:
AppenderSkeleton(const std::string& name);
public:
virtual ~AppenderSkeleton();
virtual void doAppend(const LoggingEvent& event);
virtual bool reopen();
virtual void close() = 0;
virtual bool requiresLayout() const = 0;
virtual void setLayout(Layout* layout) = 0;
virtual void setThreshold(Priority::Value priority);
virtual Priority::Value getThreshold();
virtual void setFilter(Filter* filter);
virtual Filter* getFilter();
protected:
virtual void _append(const LoggingEvent& event) = 0;
private:
Priority::Value _threshold;
Filter* _filter;
};
}
#endif // _LOG4SHIB_APPENDERSKELETON_HH
Appender.hh
LOG4SHIB_EXPORT
#define LOG4SHIB_EXPORT
Definition Export.hh:11
Filter.hh
Portability.hh
log4shib::AppenderSkeleton::doAppend
virtual void doAppend(const LoggingEvent &event)
Log in Appender specific way.
Definition AppenderSkeleton.cpp:30
log4shib::AppenderSkeleton::getFilter
virtual Filter * getFilter()
Get the Filter for this appender.
Definition AppenderSkeleton.cpp:55
log4shib::AppenderSkeleton::requiresLayout
virtual bool requiresLayout() const =0
Check if the appender uses a layout.
log4shib::AppenderSkeleton::close
virtual void close()=0
Release any resources allocated within the appender such as file handles, network connections,...
log4shib::AppenderSkeleton::setFilter
virtual void setFilter(Filter *filter)
Set a Filter for this appender.
Definition AppenderSkeleton.cpp:46
log4shib::AppenderSkeleton::reopen
virtual bool reopen()
Reopens the output destination of this Appender, e.g.
Definition AppenderSkeleton.cpp:26
log4shib::AppenderSkeleton::_append
virtual void _append(const LoggingEvent &event)=0
Log in Appender specific way.
log4shib::AppenderSkeleton::setLayout
virtual void setLayout(Layout *layout)=0
Set the Layout for this appender.
log4shib::AppenderSkeleton::AppenderSkeleton
AppenderSkeleton(const std::string &name)
Constructor for AppenderSkeleton.
Definition AppenderSkeleton.cpp:15
log4shib::AppenderSkeleton::setThreshold
virtual void setThreshold(Priority::Value priority)
Set the threshold priority of this Appender.
Definition AppenderSkeleton.cpp:38
log4shib::AppenderSkeleton::getThreshold
virtual Priority::Value getThreshold()
Get the threshold priority of this Appender.
Definition AppenderSkeleton.cpp:42
log4shib::Appender::Appender
Appender(const std::string &name)
Constructor for Appender.
Definition Appender.cpp:70
log4shib::Filter
Users should extend this class to implement customized logging event filtering.
Definition Filter.hh:49
log4shib::Layout
Extend this abstract class to create your own log layout format.
Definition Layout.hh:22
log4shib::Priority::Value
int Value
The type of Priority Values.
Definition Priority.hh:84
log4shib
The top level namespace for all 'Log for C++' types and classes.
Definition AbortAppender.hh:16
log4shib::LoggingEvent
The internal representation of logging events.
Definition LoggingEvent.hh:32