Kea: isc::process::LogConfigParser Class Reference

| Kea 2.2.0

Public Member Functions | List of all members
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. More...
void | parseConfiguration (const isc::data::ConstElementPtr &log_config, bool verbose=false)
| Parses specified configuration. More...

## 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

  storage | parsed logging configuration will be stored here

Definition at line 23 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_config | JSON structures to be parsed (loggers list)
  verbose | specifies verbose mode (true forces DEBUG, debuglevel = 99)

Definition at line 31 of file log_parser.cc.

References isc::asiodns::logger.

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

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

- log_parser.h
- log_parser.cc