Kea  2.3.5-git
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. More...
 
void clearDestinations ()
 Removes logging destinations. More...
 
bool equals (const LoggingInfo &other) const
 Compares two objects for equality. More...
 
bool operator!= (const LoggingInfo &other) const
 Compares two objects for inequality. More...
 
bool operator== (const LoggingInfo &other) const
 Compares two objects for equality. More...
 
virtual isc::data::ElementPtr toElement () const
 Unparse a configuration object. More...
 
isc::log::LoggerSpecification toSpec () const
 Converts logger configuration to a spec. More...
 
- Public Member Functions inherited from isc::data::UserContext
void contextToElement (data::ElementPtr map) const
 Merge unparse a user_context object. More...
 
data::ConstElementPtr getContext () const
 Returns const pointer to the user context. More...
 
void setContext (const data::ConstElementPtr &ctx)
 Sets user context. More...
 
- Public Member Functions inherited from isc::data::CfgToElement
virtual ~CfgToElement ()
 Destructor. More...
 

Public Attributes

int debuglevel_
 debuglevel (used when severity_ == DEBUG) More...
 
std::vector< LoggingDestinationdestinations_
 specific logging destinations More...
 
std::string name_
 logging name More...
 
isc::log::Severity severity_
 describes logging severity More...
 

Additional Inherited Members

- Static Public Member Functions inherited from isc::data::UserContext
static data::ElementPtr toElement (data::ConstElementPtr map)
 Copy an Element map. More...
 
- Protected Attributes inherited from isc::data::UserContext
data::ConstElementPtr user_context_
 Pointer to the user context (may be NULL) More...
 

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

Member Function Documentation

◆ clearDestinations()

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

Removes logging destinations.

Definition at line 102 of file logging_info.h.

References isc::process::LoggingDestination::equals().

Referenced by isc::process::LogConfigParser::parseConfiguration().

+ Here is the call graph for this function:

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

◆ 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 isc::process::LoggingDestination::equals(), and isc::process::LoggingDestination::toElement().

+ 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 isc::process::LoggingDestination::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::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 equals(), LoggingInfo(), isc::process::LogConfigParser::parseConfiguration(), 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 equals(), LoggingInfo(), isc::process::LogConfigParser::parseConfiguration(), toElement(), and toSpec().

◆ name_

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

logging name

Definition at line 85 of file logging_info.h.

Referenced by equals(), LoggingInfo(), isc::process::LogConfigParser::parseConfiguration(), 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 equals(), LoggingInfo(), isc::process::LogConfigParser::parseConfiguration(), toElement(), and toSpec().


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