Apache Log4cxx
Version 1.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
patternconverter.h
Go to the documentation of this file.
1
/*
2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifndef _LOG4CXX_PATTERN_PATTERN_CONVERTER_H
19
#define _LOG4CXX_PATTERN_PATTERN_CONVERTER_H
20
21
22
#include <
log4cxx/helpers/object.h
>
23
#include <
log4cxx/logstring.h
>
24
#include <
log4cxx/pattern/formattinginfo.h
>
25
#include <vector>
26
27
#define DECLARE_LOG4CXX_PATTERN(cls) DECLARE_ABSTRACT_LOG4CXX_OBJECT(cls)
28
29
namespace
LOG4CXX_NS
30
{
31
namespace
pattern
32
{
33
34
typedef
std::vector<LogString>
OptionsList
;
35
46
class
LOG4CXX_EXPORT
PatternConverter
:
public
virtual
helpers::Object
47
{
48
protected
:
49
LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(PatternConverterPrivate, m_priv)
50
PatternConverter
(LOG4CXX_PRIVATE_PTR(PatternConverterPrivate) priv);
51
58
PatternConverter
(const
LogString
& name,
59
const
LogString
& style);
60
61
virtual ~
PatternConverter
();
62
63
public:
64
DECLARE_LOG4CXX_PATTERN
(
PatternConverter
)
65
BEGIN_LOG4CXX_CAST_MAP
()
66
LOG4CXX_CAST_ENTRY
(
PatternConverter
)
67
END_LOG4CXX_CAST_MAP
()
68
75
virtual
void
format
(const
helpers
::ObjectPtr& obj,
76
LogString
& toAppendTo,
77
helpers
::Pool& p) const = 0;
78
86
LogString
getName
() const;
87
97
virtual
LogString
getStyleClass
(const
helpers
::ObjectPtr& e) const;
98
102
const
FormattingInfo
&
getFormattingInfo
() const;
103
107
void
setFormattingInfo
(const
FormattingInfoPtr
& newValue);
108
109
protected:
115
static
void
append
(
LogString
& toAppendTo, const std::
string
& src);
116
};
117
118
119
LOG4CXX_PTR_DEF
(
PatternConverter
);
120
121
}
122
}
123
124
125
#endif
log4cxx::helpers::Object
base class for java-like objects.
Definition
object.h:102
log4cxx::pattern::FormattingInfo
Modifies the output of a pattern converter for a specified minimum and maximum width and alignment.
Definition
formattinginfo.h:44
log4cxx::pattern::PatternConverter
Definition
patternconverter.h:47
log4cxx::pattern::PatternConverter::PatternConverter
PatternConverter(LOG4CXX_PRIVATE_PTR(PatternConverterPrivate) priv)
log4cxx::pattern::PatternConverter::getName
LogString getName() const
This method returns the name of the conversion pattern.
log4cxx::pattern::PatternConverter::append
static void append(LogString &toAppendTo, const std::string &src)
Appends content in the locale code page to a LogString.
log4cxx::pattern::PatternConverter::getFormattingInfo
const FormattingInfo & getFormattingInfo() const
Provides a minimum width, a maximum width and the alignment.
log4cxx::pattern::PatternConverter::setFormattingInfo
void setFormattingInfo(const FormattingInfoPtr &newValue)
Use newValue for the minimum width, a maximum width and the alignment.
log4cxx::pattern::PatternConverter::getStyleClass
virtual LogString getStyleClass(const helpers::ObjectPtr &e) const
This method returns the CSS style class that should be applied to the LoggingEvent passed as paramete...
log4cxx::pattern::PatternConverter::format
virtual void format(const helpers::ObjectPtr &obj, LogString &toAppendTo, helpers::Pool &p) const =0
Formats an object into a string buffer.
formattinginfo.h
logstring.h
log4cxx::helpers
Definition
propertysetter.h:27
log4cxx::pattern::OptionsList
std::vector< LogString > OptionsList
Definition
patternconverter.h:34
log4cxx::pattern::FormattingInfoPtr
std::shared_ptr< FormattingInfo > FormattingInfoPtr
Definition
formattinginfo.h:32
log4cxx::pattern::LOG4CXX_PTR_DEF
LOG4CXX_PTR_DEF(DatePatternConverter)
log4cxx::LogString
std::basic_string< logchar > LogString
Definition
logstring.h:60
object.h
LOG4CXX_CAST_ENTRY
#define LOG4CXX_CAST_ENTRY(Interface)
Definition
object.h:154
END_LOG4CXX_CAST_MAP
#define END_LOG4CXX_CAST_MAP()
Definition
object.h:148
BEGIN_LOG4CXX_CAST_MAP
#define BEGIN_LOG4CXX_CAST_MAP()
Definition
object.h:142
DECLARE_LOG4CXX_PATTERN
#define DECLARE_LOG4CXX_PATTERN(cls)
Definition
patternconverter.h:27
src
main
include
log4cxx
pattern
patternconverter.h
Generated by
1.17.0 on
SITE_PUBLISHED_DATE
Copyright © 2017-2026
Apache Software Foundation
. Apache, Chainsaw, log4cxx, Log4j, Log4net, log4php and the Apache logo are
trademarks or registered trademarks
of The Apache Software Foundation.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Privacy Policy
.