log - replace some WARN tags from LUA logs with NOTICE to avoid confusion
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user