Commit fb80943b authored by Daniel Salzman's avatar Daniel Salzman

log: add control source

parent 79bfa0aa
......@@ -1004,6 +1004,7 @@ will be logged to both standard error output and syslog. The \fBinfo\fP and
log:
\- target: stdout | stderr | syslog | STR
server: critical | error | warning | notice | info | debug
control: critical | error | warning | notice | info | debug
zone: critical | error | warning | notice | info | debug
any: critical | error | warning | notice | info | debug
.ft P
......@@ -1031,6 +1032,11 @@ Minimum severity level for messages related to general operation of the server
that are logged.
.sp
\fIDefault:\fP not set
.SS control
.sp
Minimum severity level for messages related to server control that are logged.
.sp
\fIDefault:\fP not set
.SS zone
.sp
Minimum severity level for messages related to zones that are logged.
......
......@@ -1171,6 +1171,7 @@ will be logged to both standard error output and syslog. The ``info`` and
log:
- target: stdout | stderr | syslog | STR
server: critical | error | warning | notice | info | debug
control: critical | error | warning | notice | info | debug
zone: critical | error | warning | notice | info | debug
any: critical | error | warning | notice | info | debug
......@@ -1198,6 +1199,15 @@ that are logged.
*Default:* not set
.. _log_control:
control
-------
Minimum severity level for messages related to server control that are logged.
*Default:* not set
.. _log_zone:
zone
......
......@@ -458,6 +458,11 @@ void log_reconfigure(conf_t *conf)
levels = conf_opt(&levels_val);
sink_levels_add(log, target, LOG_SOURCE_SERVER, levels);
// Set CONTROL logging.
levels_val = conf_id_get(conf, C_LOG, C_CTL, &id);
levels = conf_opt(&levels_val);
sink_levels_add(log, target, LOG_SOURCE_CONTROL, levels);
// Set ZONE logging.
levels_val = conf_id_get(conf, C_LOG, C_ZONE, &id);
levels = conf_opt(&levels_val);
......
......@@ -50,9 +50,10 @@ typedef enum {
/*! \brief Logging sources. */
typedef enum {
LOG_SOURCE_SERVER = 0, /*!< Server module. */
LOG_SOURCE_ZONE = 1, /*!< Zone manipulation module. */
LOG_SOURCE_ANY = 2 /*!< Any module. */
LOG_SOURCE_SERVER = 0, /*!< Server module. */
LOG_SOURCE_CONTROL = 1, /*!< Server control module. */
LOG_SOURCE_ZONE = 2, /*!< Zone manipulation module. */
LOG_SOURCE_ANY = 3 /*!< Any module. */
} log_source_t;
/*! \brief Logging format flags. */
......
......@@ -141,6 +141,7 @@ static const yp_item_t desc_control[] = {
static const yp_item_t desc_log[] = {
{ C_TARGET, YP_TSTR, YP_VNONE },
{ C_SERVER, YP_TOPT, YP_VOPT = { log_severities, 0 } },
{ C_CTL, YP_TOPT, YP_VOPT = { log_severities, 0 } },
{ C_ZONE, YP_TOPT, YP_VOPT = { log_severities, 0 } },
{ C_ANY, YP_TOPT, YP_VOPT = { log_severities, 0 } },
{ C_COMMENT, YP_TSTR, YP_VNONE },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment