| Kea 3.0.2-git

log_parser.h
Go to the documentation of this file.
1// Copyright (C) 2014-2025 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_H
8#define DHCPSRV_LOGGING_H
9
10#include <cc/data.h>
11#include <process/logging_info.h>
12#include <process/config_base.h>
13#include <vector>
14
15 namespace isc {
16 namespace process {
17
43 class LogConfigParser {
44 public:
45
49 LogConfigParser(const ConfigPtr& storage);
50
58 void parseConfiguration(const isc::data::ConstElementPtr& log_config,
59 bool verbose = false);
60
73 static std::string getLogPath(bool reset = false, const std::string explicit_path = "");
74
80 static std::string validatePath(const std::string logpath);
81
82 private:
83
88 void parseConfigEntry(isc::data::ConstElementPtr entry);
89
96 void parseOutputOptions(std::vector<LoggingDestination>& destination,
97 isc::data::ConstElementPtr output_options);
98
102 ConfigPtr config_;
103
108 bool verbose_;
109};
110
111} // namespace isc::dhcp
112} // namespace isc
113
114#endif // DHCPSRV_LOGGING_H
isc::process::LogConfigParser::LogConfigParser
LogConfigParser(const ConfigPtr &storage)
Constructor.
Definition log_parser.cc:30
isc::process::LogConfigParser::getLogPath
static std::string getLogPath(bool reset=false, const std::string explicit_path="")
Fetches the supported log file path.
Definition log_parser.cc:137
isc::process::LogConfigParser::validatePath
static std::string validatePath(const std::string logpath)
Validates a library path against the supported path for log files.
Definition log_parser.cc:149
isc::process::LogConfigParser::parseConfiguration
void parseConfiguration(const isc::data::ConstElementPtr &log_config, bool verbose=false)
Parses specified configuration.
Definition log_parser.cc:38
config_base.h
data.h
logging_info.h
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
isc::process
Definition cb_ctl_base.h:22
isc::process::ConfigPtr
boost::shared_ptr< ConfigBase > ConfigPtr
Non-const pointer to the ConfigBase.
Definition config_base.h:176
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148