Kea 2.7.6
isc::process::LoggingInfo Class Reference

structure that describes one logging entry More...

#include <logging_info.h>

+ Inheritance diagram for isc::process::LoggingInfo:

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< LoggingDestinationdestinations_
 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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LoggingInfo()

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_.

+ Here is the call graph for this function:

Member Function Documentation

◆ clearDestinations()

void isc::process::LoggingInfo::clearDestinations ( )
inline

Removes logging destinations.

Definition at line 102 of file logging_info.h.

References destinations_.

◆ equals()

bool isc::process::LoggingInfo::equals ( const LoggingInfo & other) const

Compares two objects for equality.

Parameters
otherAn object to be compared with this object.
Returns
true if objects are equal, false otherwise.

Definition at line 81 of file logging_info.cc.

References debuglevel_, destinations_, name_, and severity_.

Referenced by operator!=(), and operator==().

◆ operator!=()

bool isc::process::LoggingInfo::operator!= ( const LoggingInfo & other) const
inline

Compares two objects for inequality.

Parameters
otherAn object to be compared with this object.
Returns
true if objects are not equal, false otherwise.

Definition at line 127 of file logging_info.h.

References equals().

+ Here is the call graph for this function:

◆ operator==()

bool isc::process::LoggingInfo::operator== ( const LoggingInfo & other) const
inline

Compares two objects for equality.

Parameters
otherAn object to be compared with this object.
Returns
true if objects are equal, false otherwise.

Definition at line 118 of file logging_info.h.

References equals().

+ Here is the call graph for this function:

◆ toElement()

ElementPtr isc::process::LoggingInfo::toElement ( ) const
virtual

Unparse a configuration object.

Returns
a pointer to unparsed configuration

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.

+ Here is the call graph for this function:

◆ toSpec()

Member Data Documentation

◆ debuglevel_

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().

◆ destinations_

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().

◆ name_

std::string isc::process::LoggingInfo::name_

logging name

Definition at line 85 of file logging_info.h.

Referenced by LoggingInfo(), equals(), toElement(), and toSpec().

◆ severity_

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().


The documentation for this class was generated from the following files: