|
log4tango 4.0.3
|
#include <Appender.hh>
Public Member Functions | |
| virtual | ~Appender () |
| Destructor for Appender. | |
| int | append (const LoggingEvent &event) |
| Log in Appender specific way. | |
| virtual bool | reopen (void) |
| Reopens the output destination of this Appender, e.g. | |
| virtual void | close (void)=0 |
| Release any resources allocated within the appender such as file handles, network connections, etc. | |
| virtual bool | requires_layout (void) const =0 |
| Check if the appender uses a layout. | |
| virtual void | set_layout (Layout *layout=0)=0 |
| Change the layout. | |
| const std::string & | get_name (void) const |
| Returns this appender name. | |
| virtual bool | is_valid (void) const |
| Check if the appender is valid (for instance the underlying connection is ok) This default implementation always return true. | |
Protected Member Functions | |
| Appender (const std::string &name) | |
| Constructor for Appender. | |
| virtual void | level_changed (Level::Value new_level) |
| Inform an appender that its Logger's logging level has changed. | |
| virtual int | _append (const LoggingEvent &event)=0 |
| Log in Appender specific way. | |
Friends | |
| class | Logger |
| log4tango::Appender::Appender | ( | const std::string & | name | ) | [protected] |
| log4tango::Appender::~Appender | ( | ) | [virtual] |
Destructor for Appender.
| virtual int log4tango::Appender::_append | ( | const LoggingEvent & | event | ) | [protected, pure virtual] |
Log in Appender specific way.
Subclasses of Appender should implement this method to perform actual logging.
| event | The LoggingEvent to log. |
Implemented in log4tango::FileAppender, log4tango::OstreamAppender, and log4tango::RollingFileAppender.
| int log4tango::Appender::append | ( | const LoggingEvent & | event | ) | [inline] |
Log in Appender specific way.
Returns -1 on error, 0 otherwise.
| event | The LoggingEvent to log. |
| virtual void log4tango::Appender::close | ( | void | ) | [pure virtual] |
Release any resources allocated within the appender such as file handles, network connections, etc.
Implemented in log4tango::FileAppender, and log4tango::OstreamAppender.
| const std::string& log4tango::Appender::get_name | ( | void | ) | const [inline] |
Returns this appender name.
| bool log4tango::Appender::is_valid | ( | void | ) | const [virtual] |
Check if the appender is valid (for instance the underlying connection is ok) This default implementation always return true.
Overload to define your own behaviour.
Reimplemented in log4tango::FileAppender.
| void log4tango::Appender::level_changed | ( | Level::Value | new_level | ) | [protected, virtual] |
Inform an appender that its Logger's logging level has changed.
The default implementation does nothing.
| new_level | The new Logger's level. |
| bool log4tango::Appender::reopen | ( | void | ) | [virtual] |
Reopens the output destination of this Appender, e.g.
the logfile or TCP socket.
Reimplemented in log4tango::FileAppender, and log4tango::OstreamAppender.
| virtual bool log4tango::Appender::requires_layout | ( | void | ) | const [pure virtual] |
Check if the appender uses a layout.
Implemented in log4tango::LayoutAppender.
| virtual void log4tango::Appender::set_layout | ( | Layout * | layout = 0 | ) | [pure virtual] |
Change the layout.
Implemented in log4tango::LayoutAppender.
friend class Logger [friend] |
1.7.4