Kea 2.7.5
|
structure that describes one logging entry More...
#include <logging_info.h>
Public Member Functions | |
LoggingInfo () | |
Default constructor. | |
void | clearDestinations () |
Removes logging destinations. | |
bool | equals (const LoggingInfo &other) const |
Compares two objects for equality. | |
bool | operator!= (const LoggingInfo &other) const |
Compares two objects for inequality. | |
bool | operator== (const LoggingInfo &other) const |
Compares two objects for equality. | |
virtual isc::data::ElementPtr | toElement () const |
Unparse a configuration object. | |
isc::log::LoggerSpecification | toSpec () const |
Converts logger configuration to a spec. | |
Public Member Functions inherited from isc::data::UserContext | |
void | contextToElement (data::ElementPtr map) const |
Merge unparse a user_context object. | |
data::ConstElementPtr | getContext () const |
Returns const pointer to the user context. | |
void | setContext (const data::ConstElementPtr &ctx) |
Sets user context. | |
Public Member Functions inherited from isc::data::CfgToElement | |
virtual | ~CfgToElement () |
Destructor. | |
Public Attributes | |
int | debuglevel_ |
debuglevel (used when severity_ == DEBUG) | |
std::vector< LoggingDestination > | destinations_ |
specific logging destinations | |
std::string | name_ |
logging name | |
isc::log::Severity | severity_ |
describes logging severity | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::data::UserContext | |
static data::ElementPtr | toElement (data::ConstElementPtr map) |
Copy an Element map. | |
Protected Attributes inherited from isc::data::UserContext | |
data::ConstElementPtr | user_context_ |
Pointer to the user context (may be NULL) | |
structure that describes one logging entry
This is a structure that conveys one logger entry configuration. The structure in JSON form has the following syntax: { "name": "*", "output-options": [ { "output": "/path/to/the/logfile.log", "maxver": 8, "maxsize": 204800, "flush": true "pattern": "%-5p [%c] %m\n" } ], "severity": "WARN", "debuglevel": 99 },
Definition at line 81 of file logging_info.h.
isc::process::LoggingInfo::LoggingInfo | ( | ) |
Default constructor.
Definition at line 57 of file logging_info.cc.
References isc::log::DEBUG, debuglevel_, destinations_, isc::process::Daemon::getDefaultLoggerName(), isc::process::Daemon::getVerbose(), name_, isc::process::LoggingDestination::output_, and severity_.
|
inline |
Removes logging destinations.
Definition at line 102 of file logging_info.h.
References destinations_.
bool isc::process::LoggingInfo::equals | ( | const LoggingInfo & | other | ) | const |
Compares two objects for equality.
other | An object to be compared with this object. |
Definition at line 81 of file logging_info.cc.
References debuglevel_, destinations_, name_, and severity_.
Referenced by operator!=(), and operator==().
|
inline |
Compares two objects for inequality.
other | An object to be compared with this object. |
Definition at line 127 of file logging_info.h.
References equals().
|
inline |
Compares two objects for equality.
other | An object to be compared with this object. |
Definition at line 118 of file logging_info.h.
References equals().
|
virtual |
Unparse a configuration object.
Implements isc::data::CfgToElement.
Definition at line 165 of file logging_info.cc.
References isc::data::UserContext::contextToElement(), isc::data::Element::create(), isc::data::Element::createList(), isc::data::Element::createMap(), isc::log::DEBUG, debuglevel_, destinations_, isc::log::ERROR, isc::log::FATAL, isc::log::INFO, isc_throw, name_, isc::log::NONE, severity_, and isc::log::WARN.
LoggerSpecification isc::process::LoggingInfo::toSpec | ( | ) | const |
Converts logger configuration to a spec.
Definition at line 110 of file logging_info.cc.
References debuglevel_, isc::log::OutputOption::DEST_CONSOLE, isc::log::OutputOption::DEST_FILE, isc::log::OutputOption::DEST_SYSLOG, isc::log::OutputOption::destination, destinations_, isc::log::getDefaultRootLoggerName(), name_, severity_, isc::log::OutputOption::STR_STDERR, and isc::log::OutputOption::STR_STDOUT.
int isc::process::LoggingInfo::debuglevel_ |
debuglevel (used when severity_ == DEBUG)
We use range 0(least verbose)..99(most verbose)
Definition at line 93 of file logging_info.h.
Referenced by LoggingInfo(), equals(), toElement(), and toSpec().
std::vector<LoggingDestination> isc::process::LoggingInfo::destinations_ |
specific logging destinations
Definition at line 96 of file logging_info.h.
Referenced by LoggingInfo(), clearDestinations(), equals(), toElement(), and toSpec().
std::string isc::process::LoggingInfo::name_ |
logging name
Definition at line 85 of file logging_info.h.
Referenced by LoggingInfo(), equals(), toElement(), and toSpec().
isc::log::Severity isc::process::LoggingInfo::severity_ |
describes logging severity
Definition at line 88 of file logging_info.h.
Referenced by LoggingInfo(), equals(), toElement(), and toSpec().