Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
log4cpp
BufferingAppender.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2002, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
3
* Copyright 2002, Bastiaan Bakker. All rights reserved.
4
*
5
* See the COPYING file for the terms of usage and distribution.
6
*/
7
8
#if !defined(h_ebd0ee89_622d_4af1_9a9d_d0e057debe86)
9
#define h_ebd0ee89_622d_4af1_9a9d_d0e057debe86
10
11
#include <
log4cpp/LayoutAppender.hh
>
12
#include <
log4cpp/TriggeringEventEvaluator.hh
>
13
#include <list>
14
#include <memory>
15
16
namespace
log4cpp
17
{
18
class
LOG4CPP_EXPORT
BufferingAppender
:
public
LayoutAppender
19
{
20
public
:
21
BufferingAppender
(
const
std::string name,
unsigned
long
max_size, std::auto_ptr<Appender> sink,
22
std::auto_ptr<TriggeringEventEvaluator> evaluator);
23
24
virtual
void
close
() { sink_->close(); }
25
26
bool
getLossy
()
const
{
return
lossy_; }
27
void
setLossy
(
bool
lossy) { lossy_ = lossy; }
28
29
protected
:
30
virtual
void
_append(
const
LoggingEvent
& event);
31
32
private
:
33
typedef
std::list<LoggingEvent>
queue_t
;
34
35
queue_t
queue_
;
36
unsigned
long
max_size_
;
37
std::auto_ptr<Appender>
sink_
;
38
std::auto_ptr<TriggeringEventEvaluator>
evaluator_
;
39
bool
lossy_
;
40
41
void
dump();
42
};
43
}
44
45
#endif // h_ebd0ee89_622d_4af1_9a9d_d0e057debe86
log4cpp::BufferingAppender::max_size_
unsigned long max_size_
Definition:
BufferingAppender.hh:36
log4cpp::BufferingAppender::queue_t
std::list< LoggingEvent > queue_t
Definition:
BufferingAppender.hh:33
log4cpp::BufferingAppender::getLossy
bool getLossy() const
Definition:
BufferingAppender.hh:26
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition:
Export.hh:26
log4cpp
Definition:
AbortAppender.hh:16
log4cpp::BufferingAppender::queue_
queue_t queue_
Definition:
BufferingAppender.hh:35
log4cpp::LoggingEvent
Definition:
LoggingEvent.hh:32
log4cpp::BufferingAppender
Definition:
BufferingAppender.hh:18
TriggeringEventEvaluator.hh
log4cpp::BufferingAppender::evaluator_
std::auto_ptr< TriggeringEventEvaluator > evaluator_
Definition:
BufferingAppender.hh:38
log4cpp::BufferingAppender::sink_
std::auto_ptr< Appender > sink_
Definition:
BufferingAppender.hh:37
log4cpp::LayoutAppender
Definition:
LayoutAppender.hh:24
log4cpp::BufferingAppender::close
virtual void close()
Definition:
BufferingAppender.hh:24
log4cpp::BufferingAppender::setLossy
void setLossy(bool lossy)
Definition:
BufferingAppender.hh:27
log4cpp::BufferingAppender::lossy_
bool lossy_
Definition:
BufferingAppender.hh:39
LayoutAppender.hh
log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Jun 23 2019 19:14:17