]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
modules/prefill nit: unify log tag to `[prefil]`
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 2 Dec 2021 18:32:17 +0000 (19:32 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 22 Dec 2021 12:48:29 +0000 (13:48 +0100)
modules/prefill/prefill.lua

index 1f66bb48e0e6bdfc58c68650f31519df370d48c3..6bcbc09a1aa9950b5c6e38e11715aa399b052637 100644 (file)
@@ -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