log - replace some WARN tags from LUA logs with NOTICE to avoid confusion

This commit is contained in:
bunkerity
2021-04-27 09:57:07 +02:00
parent 19fa0eb25f
commit 843644f806
10 changed files with 24 additions and 24 deletions

View File

@@ -26,7 +26,7 @@ function M.check_ip ()
if #ip_list > 0 then
if iputils.ip_in_cidrs(ip, blacklist) then
ngx.shared.blacklist_ip_cache:set(ip, "ko", 86400)
ngx.log(ngx.WARN, "ip " .. ip .. " is in blacklist")
ngx.log(ngx.NOTICE, "ip " .. ip .. " is in blacklist")
return true
end
end
@@ -41,7 +41,7 @@ function M.check_reverse ()
for k, v in ipairs(reverse_list) do
if rdns:sub(-#v) == v then
ngx.shared.blacklist_reverse_cache:set(ip, "ko", 86400)
ngx.log(ngx.WARN, "reverse " .. rdns .. " is in blacklist")
ngx.log(ngx.NOTICE, "reverse " .. rdns .. " is in blacklist")
return true
end
end

View File

@@ -20,7 +20,7 @@ function M.check ()
local a,b,c,d = v2:match("([%d]+).([%d]+).([%d]+).([%d]+)")
if a == "127" then
ngx.shared.dnsbl_cache:set(ip, "ko", 86400)
ngx.log(ngx.WARN, "ip " .. ip .. " is in DNSBL " .. v)
ngx.log(ngx.NOTICE, "ip " .. ip .. " is in DNSBL " .. v)
return true
end
end

View File

@@ -26,7 +26,7 @@ function M.check_ip ()
if #ip_list > 0 then
if iputils.ip_in_cidrs(ip, whitelist) then
ngx.shared.whitelist_ip_cache:set(ip, "ok", 86400)
ngx.log(ngx.WARN, "ip " .. ip .. " is in whitelist")
ngx.log(ngx.NOTICE, "ip " .. ip .. " is in whitelist")
return true
end
end
@@ -50,7 +50,7 @@ function M.check_reverse ()
for k, v in ipairs(ips) do
if v == ip then
ngx.shared.whitelist_reverse_cache:set(ip, "ok", 86400)
ngx.log(ngx.WARN, "reverse " .. rdns .. " is in whitelist")
ngx.log(ngx.NOTICE, "reverse " .. rdns .. " is in whitelist")
return true
end
end