log4shib 2.0.0

OstreamAppender.hh
Go to the documentation of this file.
1/*
2 * OstreamAppender.hh
3 *
4 * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5 * Copyright 2000, Bastiaan Bakker. All rights reserved.
6 *
7 * See the COPYING file for the terms of usage and distribution.
8 */
9
10#ifndef _LOG4SHIB_OSTREAMAPPENDER_HH
11#define _LOG4SHIB_OSTREAMAPPENDER_HH
12
13#include <log4shib/Portability.hh>
14#include <string>
15#include <iostream>
16#include <log4shib/LayoutAppender.hh>
17
18 namespace log4shib {
19
23 class LOG4SHIB_EXPORT OstreamAppender : public LayoutAppender {
24 public:
25 OstreamAppender(const std::string& name, std::ostream* stream);
26 virtual ~OstreamAppender();
27
28 virtual bool reopen();
29 virtual void close();
30
31 protected:
32 virtual void _append(const LoggingEvent& event);
33
34 std::ostream* _stream;
35 };
36}
37
38#endif // _LOG4SHIB_OSTREAMAPPENDER_HH
LOG4SHIB_EXPORT
#define LOG4SHIB_EXPORT
Definition: Export.hh:11
LayoutAppender.hh
Portability.hh
log4shib::LayoutAppender
LayoutAppender is a common superclass for all Appenders that require a Layout.
Definition: LayoutAppender.hh:24
log4shib::OstreamAppender
OstreamAppender appends LoggingEvents to ostreams.
Definition: OstreamAppender.hh:23
log4shib::OstreamAppender::_stream
std::ostream * _stream
Definition: OstreamAppender.hh:34
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