Kea 2.7.4
isc::process::LogConfigParser Class Reference

Configures log4cplus by translating Kea configuration structures. More...

#include <log_parser.h>

Public Member Functions

 LogConfigParser (const ConfigPtr &storage)
 Constructor.
 
void parseConfiguration (const isc::data::ConstElementPtr &log_config, bool verbose=false)
 Parses specified configuration.
 

Detailed Description

Configures log4cplus by translating Kea configuration structures.

This parser iterates over provided data elements and translates them into values applicable to log4cplus.

The data structures converted to JSON format have the following syntax: { "name": "kea", "output-options": [ { "output": "/home/thomson/kea-inst/kea-warn.log", "maxver": 8, "maxsize": 204800, "flush": true } ], "severity": "WARN" }

This is only an example and actual values may be different.

The data structures don't have to originate from JSON. JSON is just a convenient presentation syntax.

This class uses ConfigBase object to store logging configuration.

Definition at line 43 of file log_parser.h.

Constructor & Destructor Documentation

◆ LogConfigParser()

isc::process::LogConfigParser::LogConfigParser ( const ConfigPtr & storage)

Constructor.

Parameters
storageparsed logging configuration will be stored here

Definition at line 22 of file log_parser.cc.

References isc_throw.

Member Function Documentation

◆ parseConfiguration()

void isc::process::LogConfigParser::parseConfiguration ( const isc::data::ConstElementPtr & log_config,
bool verbose = false )

Parses specified configuration.

Walks over specified logging configuration JSON structures and store parsed information in config_->logging_info_.

Parameters
log_configJSON structures to be parsed (loggers list)
verbosespecifies verbose mode (true forces DEBUG, debuglevel = 99)

Definition at line 30 of file log_parser.cc.

Referenced by isc::process::Daemon::configureLogger().


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