Kea: logger_level_impl.h Source File

| Kea 2.2.0

logger_level_impl.h
Go to the documentation of this file.
1// Copyright (C) 2011-2017 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_IMPL_H
8#define LOGGER_LEVEL_IMPL_H
9
10#include <log4cplus/logger.h>
11#include <log4cplus/version.h>
12#include <log/logger_level.h>
13
14namespace isc {
15namespace log {
16
57
58 class LoggerLevelImpl {
59public:
60
61 typedef log4cplus::tstring LogLevelString;
62
72 static
73 log4cplus::LogLevel convertFromBindLevel(const isc::log::Level& level);
74
84 static
85 isc::log::Level convertToBindLevel(const log4cplus::LogLevel loglevel);
86
99 static
100 log4cplus::LogLevel logLevelFromString(const log4cplus::tstring& level);
101
110#if LOG4CPLUS_VERSION < LOG4CPLUS_MAKE_VERSION(2, 0, 0)
111 static LogLevelString logLevelToString(log4cplus::LogLevel level);
112#else
113 static const LogLevelString& logLevelToString(log4cplus::LogLevel level);
114#endif
115
120 static void init();
121};
122
123} // namespace log
124} // namespace isc
125
126#endif // LOGGER_LEVEL_IMPL_H
isc::log::LoggerLevelImpl
Implementation aspects of logging levels.
Definition: logger_level_impl.h:58
isc::log::LoggerLevelImpl::convertFromBindLevel
static log4cplus::LogLevel convertFromBindLevel(const isc::log::Level &level)
Convert Kea level to log4cplus logging level.
Definition: logger_level_impl.cc:33
isc::log::LoggerLevelImpl::logLevelToString
static const LogLevelString & logLevelToString(log4cplus::LogLevel level)
Convert log level to string.
Definition: logger_level_impl.cc:185
isc::log::LoggerLevelImpl::logLevelFromString
static log4cplus::LogLevel logLevelFromString(const log4cplus::tstring &level)
Convert string to log4cplus logging level.
Definition: logger_level_impl.cc:123
isc::log::LoggerLevelImpl::LogLevelString
log4cplus::tstring LogLevelString
Definition: logger_level_impl.h:61
isc::log::LoggerLevelImpl::convertToBindLevel
static isc::log::Level convertToBindLevel(const log4cplus::LogLevel loglevel)
Convert log4cplus logging level to Kea logging level.
Definition: logger_level_impl.cc:81
isc::log::LoggerLevelImpl::init
static void init()
Initialize extended logging levels.
Definition: logger_level_impl.cc:204
logger_level.h
isc
Defines the logger used by the top-level component of kea-lfc.
Definition: agent_parser.cc:143
isc::log::Level
Log level structure.
Definition: logger_level.h:42