Kea 2.7.5
logging_info.h
Go to the documentation of this file.
1// Copyright (C) 2014-2023 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef DHCPSRV_LOGGING_INFO_H
8#define DHCPSRV_LOGGING_INFO_H
9
10#include <log/logger_level.h>
12#include <cc/cfg_to_element.h>
13#include <cc/user_context.h>
14#include <stdint.h>
15#include <vector>
16
17namespace isc {
18namespace process {
19
24public:
25
30 std::string output_;
31
34
36 uint64_t maxsize_;
37
39 bool flush_;
40
43 std::string pattern_;
44
50 bool equals(const LoggingDestination& other) const;
51
54 : output_("stdout"), maxver_(1), maxsize_(10240000), flush_(true), pattern_("") {
55 }
56
60 virtual isc::data::ElementPtr toElement() const;
61};
62
82public:
83
85 std::string name_;
86
89
94
96 std::vector<LoggingDestination> destinations_;
97
100
103 destinations_.clear();
104 }
105
111 bool equals(const LoggingInfo& other) const;
112
118 bool operator==(const LoggingInfo& other) const {
119 return (equals(other));
120 }
121
127 bool operator!=(const LoggingInfo& other) const {
128 return (!equals(other));
129 }
130
133
137 virtual isc::data::ElementPtr toElement() const;
138};
139
141typedef std::vector<isc::process::LoggingInfo> LoggingInfoStorage;
142
143}
144}
145
146#endif // DHCPSRV_LOGGING_INFO_H
structure that describes one logging entry
LoggingInfo()
Default constructor.
int debuglevel_
debuglevel (used when severity_ == DEBUG)
bool equals(const LoggingInfo &other) const
Compares two objects for equality.
bool operator!=(const LoggingInfo &other) const
Compares two objects for inequality.
isc::log::LoggerSpecification toSpec() const
Converts logger configuration to a spec.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
void clearDestinations()
Removes logging destinations.
std::string name_
logging name
bool operator==(const LoggingInfo &other) const
Compares two objects for equality.
std::vector< LoggingDestination > destinations_
specific logging destinations
isc::log::Severity severity_
describes logging severity
boost::shared_ptr< Element > ElementPtr
Definition data.h:28
Severity
Severity Levels.
std::vector< isc::process::LoggingInfo > LoggingInfoStorage
storage for logging information in log4cplus format
Defines the logger used by the top-level component of kea-lfc.
Abstract class for configuration Cfg_* classes.
Base class for user context.
Defines single logging destination.
int maxver_
Maximum number of log files in rotation.
std::string output_
defines logging destination output
std::string pattern_
defines the log format pattern It dictates what additional elements are output
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
LoggingDestination()
Default constructor.
bool equals(const LoggingDestination &other) const
Compares two objects for equality.
uint64_t maxsize_
Maximum log file size.
bool flush_
Immediate flush.