Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
log4cpp
PatternLayout.hh
Go to the documentation of this file.
1
/*
2
* PatternLayout.hh
3
*
4
* Copyright 2002, Bastiaan Bakker. All rights reserved.
5
*
6
* See the COPYING file for the terms of usage and distribution.
7
*/
8
9
#ifndef _LOG4CPP_PATTERNLAYOUT_HH
10
#define _LOG4CPP_PATTERNLAYOUT_HH
11
12
#include <
log4cpp/Portability.hh
>
13
#include <
log4cpp/Layout.hh
>
14
#include <
log4cpp/Configurator.hh
>
15
#include <vector>
16
#ifdef LOG4CPP_HAVE_SSTREAM
17
#include <sstream>
18
#endif
19
20
namespace
log4cpp
{
21
25
class
LOG4CPP_EXPORT
PatternLayout
:
public
Layout
{
26
public
:
30
static
const
char
*
DEFAULT_CONVERSION_PATTERN
;
31
35
static
const
char
*
SIMPLE_CONVERSION_PATTERN
;
36
40
static
const
char
*
BASIC_CONVERSION_PATTERN
;
41
46
static
const
char
*
TTCC_CONVERSION_PATTERN
;
47
48
PatternLayout
();
49
virtual
~
PatternLayout
();
50
51
// NOTE: All double percentage signs ('%%') followed by a character
52
// in the following comments should actually be a single char.
53
// The doubles are included so that doxygen will print them correctly.
59
virtual
std::string format(
const
LoggingEvent
& event);
60
87
virtual
void
setConversionPattern(
const
std::string& conversionPattern)
88
throw
(
ConfigureFailure
);
89
90
virtual
std::string getConversionPattern()
const
;
91
92
virtual
void
clearConversionPattern();
93
94
class
LOG4CPP_EXPORT
PatternComponent
{
95
public
:
96
inline
virtual
~PatternComponent
() {};
97
virtual
void
append(
std::ostringstream
& out,
const
LoggingEvent
& event) = 0;
98
};
99
100
private
:
101
typedef
std::vector<PatternComponent*>
ComponentVector
;
102
ComponentVector
_components
;
103
104
std::string
_conversionPattern
;
105
};
106
}
107
108
#endif // _LOG4CPP_PATTERNLAYOUT_HH
log4cpp::PatternLayout::ComponentVector
std::vector< PatternComponent * > ComponentVector
Definition:
PatternLayout.hh:101
Configurator.hh
Layout.hh
log4cpp::PatternLayout::DEFAULT_CONVERSION_PATTERN
static const char * DEFAULT_CONVERSION_PATTERN
Definition:
PatternLayout.hh:30
log4cpp::PatternLayout::_components
ComponentVector _components
Definition:
PatternLayout.hh:102
log4cpp::Layout
Definition:
Layout.hh:22
log4cpp::ConfigureFailure
Definition:
Configurator.hh:21
Portability.hh
log4cpp::PatternLayout::PatternComponent
Definition:
PatternLayout.hh:94
log4cpp::PatternLayout::PatternComponent::~PatternComponent
virtual ~PatternComponent()
Definition:
PatternLayout.hh:96
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition:
Export.hh:26
log4cpp
Definition:
AbortAppender.hh:16
log4cpp::PatternLayout::SIMPLE_CONVERSION_PATTERN
static const char * SIMPLE_CONVERSION_PATTERN
Definition:
PatternLayout.hh:35
log4cpp::LoggingEvent
Definition:
LoggingEvent.hh:32
log4cpp::PatternLayout::BASIC_CONVERSION_PATTERN
static const char * BASIC_CONVERSION_PATTERN
Definition:
PatternLayout.hh:40
log4cpp::PatternLayout::TTCC_CONVERSION_PATTERN
static const char * TTCC_CONVERSION_PATTERN
Definition:
PatternLayout.hh:46
std::ostringstream
Definition:
Portability.hh:45
log4cpp::PatternLayout::_conversionPattern
std::string _conversionPattern
Definition:
PatternLayout.hh:104
log4cpp::PatternLayout
Definition:
PatternLayout.hh:25
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:10:00