Kea 3.3.3
logger_level.h
Go to the documentation of this file.
1// Copyright (C) 2011-2026 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 LOGGER_LEVEL_H
8#define LOGGER_LEVEL_H
9
10#include <cstdint>
11#include <string>
12
13namespace isc {
14namespace log {
15
23
24enum Severity : uint16_t {
25 DEFAULT = 0, // Default to logging level of the parent
26 DEBUG = 1,
27 INFO = 2,
28 WARN = 3,
29 ERROR = 4,
30 FATAL = 5,
31 NONE = 6 // Disable logging
32};
33
35
36const int MIN_DEBUG_LEVEL = 0;
37const int MAX_DEBUG_LEVEL = 99;
38
43struct Level {
46
48 severity(sev), dbglevel(dbg)
49 {}
50
51 // Default assignment and copy constructor is appropriate
52};
53
64isc::log::Severity getSeverity(const std::string& sev_str);
65
66} // namespace log
67} // namespace isc
68
69#endif // LOGGER_LEVEL_H
Severity
Severity Levels.
isc::log::Severity getSeverity(const std::string &sev_str)
Returns the isc::log::Severity value represented by the given string.
const int MAX_DEBUG_LEVEL
const int MIN_DEBUG_LEVEL
Minimum/maximum debug levels.
Defines the logger used by the top-level component of kea-lfc.
int dbglevel
Debug level.
Level(Severity sev=DEFAULT, int dbg=MIN_DEBUG_LEVEL)
Severity severity
Logging severity.