From: Tomas Krizek Date: Tue, 27 Jul 2021 21:56:59 +0000 (+0200) Subject: logging: linter nitpicks X-Git-Tag: v5.4.0~2^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da3ac960938c045c74ec1e61965f37fb6774e579;p=thirdparty%2Fknot-resolver.git logging: linter nitpicks --- diff --git a/.luacheckrc b/.luacheckrc index 0134706e8..28ef054d1 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -39,6 +39,9 @@ new_read_globals = { 'log_fmt', 'log_qry', 'log_req', + 'log_level', + 'log_target', + 'log_groups', 'LOG_CRIT', 'LOG_ERR', 'LOG_WARNING', diff --git a/doc/config-logging-monitoring.rst b/doc/config-logging-monitoring.rst index 6e6035296..4516bee56 100644 --- a/doc/config-logging-monitoring.rst +++ b/doc/config-logging-monitoring.rst @@ -62,6 +62,7 @@ set by :func:`log_level`. remove all log groups, call the function with an empty table. .. code-block:: lua + log_groups({'io', 'tls'} -- turn on debug logging for io and tls groups log_groups() -- list active log groups log_groups({}) -- remove all log groups diff --git a/lib/log.c b/lib/log.c index ede5b83ec..ef1e508b5 100644 --- a/lib/log.c +++ b/lib/log.c @@ -220,8 +220,6 @@ void kr_log_level_set(kr_log_level_t level) setlogmask(LOG_UPTO(kr_log_level)); kr_gnutls_log_level_set(); - - return; } void kr_log_group_add(enum kr_log_group group)