Kea 2.7.4
|
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. | |
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.
isc::process::LogConfigParser::LogConfigParser | ( | const ConfigPtr & | storage | ) |
Constructor.
storage | parsed logging configuration will be stored here |
Definition at line 22 of file log_parser.cc.
References isc_throw.
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_.
log_config | JSON structures to be parsed (loggers list) |
verbose | specifies verbose mode (true forces DEBUG, debuglevel = 99) |
Definition at line 30 of file log_parser.cc.
Referenced by isc::process::Daemon::configureLogger().