log4shib
2.0.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
include
log4shib
FixedContextCategory.hh
Go to the documentation of this file.
1
/*
2
* FixedContextCategory.hh
3
*
4
* Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5
* Copyright 2001, Bastiaan Bakker. All rights reserved.
6
*
7
* See the COPYING file for the terms of usage and distribution.
8
*/
9
10
#ifndef _LOG4SHIB_FIXEDCONTEXTCATEGORY_HH
11
#define _LOG4SHIB_FIXEDCONTEXTCATEGORY_HH
12
13
#include <
log4shib/Portability.hh
>
14
#include <
log4shib/Category.hh
>
15
16
namespace
log4shib {
17
29
class
LOG4SHIB_EXPORT
FixedContextCategory
:
public
Category
{
30
31
public
:
32
40
FixedContextCategory
(
const
std::string& name,
41
const
std::string& context =
""
);
42
43
47
virtual
~
FixedContextCategory
();
48
53
virtual
void
setContext(
const
std::string& context);
54
59
virtual
std::string getContext()
const
;
60
65
virtual
Priority::Value
getPriority()
const
throw
();
66
75
virtual
Priority::Value
getChainedPriority()
const
throw
();
76
80
virtual
void
addAppender(
Appender
* appender)
throw
();
81
85
virtual
void
addAppender(
Appender
& appender);
86
92
virtual
Appender
* getAppender()
const
;
93
100
virtual
Appender
* getAppender(
const
std::string& name)
const
;
101
107
virtual
AppenderSet
getAllAppenders()
const
;
108
113
virtual
void
removeAllAppenders();
114
119
virtual
bool
ownsAppender(
Appender
* appender)
120
const
throw
();
121
133
virtual
void
callAppenders(
const
LoggingEvent
& event)
throw
();
134
138
virtual
void
setAdditivity(
bool
additivity);
139
143
virtual
bool
getAdditivity()
const
throw
();
144
145
protected
:
146
152
virtual
void
_logUnconditionally2(
Priority::Value
priority,
153
const
std::string& message)
throw
();
154
155
private
:
156
160
Category
& _delegate;
161
163
std::string _context;
164
165
};
166
167
}
168
#endif // _LOG4SHIB_FIXEDCONTEXTCATEGORY_HH
log4shib::FixedContextCategory
This Category subclass replaces the NDC field in LoggingEvents with a fixed context string...
Definition:
FixedContextCategory.hh:29
log4shib::AppenderSet
std::set< Appender * > AppenderSet
Definition:
Appender.hh:147
log4shib::LoggingEvent
The internal representation of logging events.
Definition:
LoggingEvent.hh:32
log4shib::Appender
Implement this interface for your own strategies for printing log statements.
Definition:
Appender.hh:33
Portability.hh
LOG4SHIB_EXPORT
#define LOG4SHIB_EXPORT
Definition:
Export.hh:11
Category.hh
log4shib::Priority::Value
int Value
The type of Priority Values.
Definition:
Priority.hh:84
log4shib::Category
This is the central class in the log4j package.
Definition:
Category.hh:32
Generated by
1.8.5