Loading...
Searching...
No Matches
OstreamAppender.hh
Go to the documentation of this file.
/*
* OstreamAppender.hh
*
* Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
* Copyright 2000, Bastiaan Bakker. All rights reserved.
*
* See the COPYING file for the terms of usage and distribution.
*/
#ifndef _LOG4SHIB_OSTREAMAPPENDER_HH
#define _LOG4SHIB_OSTREAMAPPENDER_HH
#include <log4shib/Portability.hh>
#include <string>
#include <iostream>
#include <log4shib/LayoutAppender.hh>
namespace log4shib {
class LOG4SHIB_EXPORT OstreamAppender : public LayoutAppender {
public:
OstreamAppender(const std::string& name, std::ostream* stream);
virtual ~OstreamAppender();
virtual bool reopen();
virtual void close();
protected:
virtual void _append(const LoggingEvent& event);
std::ostream* _stream;
};
}
#endif // _LOG4SHIB_OSTREAMAPPENDER_HH
LOG4SHIB_EXPORT
#define LOG4SHIB_EXPORT
Definition Export.hh:11
LayoutAppender.hh
Portability.hh
log4shib::LayoutAppender::LayoutAppender
LayoutAppender(const std::string &name)
Definition LayoutAppender.cpp:15
log4shib::OstreamAppender::OstreamAppender
OstreamAppender(const std::string &name, std::ostream *stream)
Definition OstreamAppender.cpp:21
log4shib::OstreamAppender::_stream
std::ostream * _stream
Definition OstreamAppender.hh:34
log4shib::OstreamAppender::close
virtual void close()
Release any resources allocated within the appender such as file handles, network connections,...
Definition OstreamAppender.cpp:30
log4shib::OstreamAppender::_append
virtual void _append(const LoggingEvent &event)
Log in Appender specific way.
Definition OstreamAppender.cpp:34
log4shib::OstreamAppender::reopen
virtual bool reopen()
Reopens the output destination of this Appender, e.g.
Definition OstreamAppender.cpp:41
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