From: Vladimír Čunát Date: Thu, 2 Dec 2021 18:32:17 +0000 (+0100) Subject: modules/prefill nit: unify log tag to `[prefil]` X-Git-Tag: v5.5.0~24^2~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=a877c70044048c7228c45528941fb5ba582e5e98;p=thirdparty%2Fknot-resolver.git modules/prefill nit: unify log tag to `[prefil]` --- diff --git a/modules/prefill/prefill.lua b/modules/prefill/prefill.lua index 1f66bb48e..6bcbc09a1 100644 --- a/modules/prefill/prefill.lua +++ b/modules/prefill/prefill.lua @@ -75,14 +75,14 @@ local function download(url, fname) local file, rcode, errmsg file, errmsg = io.open(fname, 'w') if not file then - error(string.format("[prefill] unable to open file %s (%s)", + error(string.format("[prefil] unable to open file %s (%s)", fname, errmsg)) end log_info(ffi.C.LOG_GRP_PREFILL, "downloading root zone to file %s ...", fname) rcode, errmsg = kluautil.kr_https_fetch(url, file, rz_ca_file) if rcode == nil then - error(string.format("[prefill] fetch of `%s` failed: %s", url, errmsg)) + error(string.format("[prefil] fetch of `%s` failed: %s", url, errmsg)) end file:close() @@ -97,7 +97,7 @@ local function import(fname) log_info(ffi.C.LOG_GRP_PREFILL, "zone successfully parsed, import started") else error(string.format( - "[prefill] zone import failed: %s", ffi.C.knot_strerror(ret) + "[prefil] zone import failed: %s", ffi.C.knot_strerror(ret) )) end end @@ -156,7 +156,7 @@ local function config_zone(zone_cfg) if zone_cfg.interval then zone_cfg.interval = tonumber(zone_cfg.interval) if zone_cfg.interval < rz_interval_min then - error(string.format('[prefill] refresh interval %d s is too short, ' + error(string.format('[prefil] refresh interval %d s is too short, ' .. 'minimal interval is %d s', zone_cfg.interval, rz_interval_min)) end @@ -167,7 +167,7 @@ local function config_zone(zone_cfg) rz_ca_file = zone_cfg.ca_file if not zone_cfg.url or not string.match(zone_cfg.url, '^https://') then - error('[prefill] option url must contain a ' + error('[prefil] option url must contain a ' .. 'https:// URL of a zone file') else rz_url = zone_cfg.url @@ -178,12 +178,12 @@ function prefill.config(config) if config == nil then return end -- e.g. just modules = { 'prefill' } local root_configured = false if type(config) ~= 'table' then - error('[prefill] configuration must be in table ' + error('[prefil] configuration must be in table ' .. '{owner name = {per-zone config}}') end for owner, zone_cfg in pairs(config) do if owner ~= '.' then - error('[prefill] only root zone can be imported ' + error('[prefil] only root zone can be imported ' .. 'at the moment') else config_zone(zone_cfg) @@ -191,7 +191,7 @@ function prefill.config(config) end end if not root_configured then - error('[prefill] this module version requires configuration ' + error('[prefil] this module version requires configuration ' .. 'for root zone') end