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

@@ -13,7 +13,7 @@ rewrite_by_lua_block {
if api.is_api_call(api_uri) then
ngx.header.content_type = 'text/plain'
if api.do_api_call(api_uri) then
ngx.log(ngx.WARN, "[API] API call " .. ngx.var.request_uri .. " successfull from " .. ngx.var.remote_addr)
ngx.log(ngx.NOTICE, "[API] API call " .. ngx.var.request_uri .. " successfull from " .. ngx.var.remote_addr)
ngx.say("ok")
else
ngx.log(ngx.WARN, "[API] API call " .. ngx.var.request_uri .. " failed from " .. ngx.var.remote_addr)

View File

@@ -6,7 +6,7 @@ rewrite_by_lua_block {
if api.is_api_call(api_uri) then
ngx.header.content_type = 'text/plain'
if api.do_api_call(api_uri) then
ngx.log(ngx.WARN, "[API] API call " .. ngx.var.request_uri .. " successfull from " .. ngx.var.remote_addr)
ngx.log(ngx.NOTICE, "[API] API call " .. ngx.var.request_uri .. " successfull from " .. ngx.var.remote_addr)
ngx.say("ok")
else
ngx.log(ngx.WARN, "[API] API call " .. ngx.var.request_uri .. " failed from " .. ngx.var.remote_addr)

View File

@@ -5,5 +5,5 @@ init_by_lua_block {
ngx.log(ngx.ERR, "[Crowdsec] " .. err)
error()
end
ngx.log(ngx.WARN, "[Crowdsec] Initialisation done")
ngx.log(ngx.NOTICE, "[Crowdsec] Initialisation done")
}

View File

@@ -50,7 +50,7 @@ http {
# write logs to local syslog
log_format logf '%LOG_FORMAT%';
access_log syslog:server=unix:/tmp/log,nohostname,facility=local0,severity=notice logf;
error_log syslog:server=unix:/tmp/log,nohostname,facility=local0 warn;
error_log syslog:server=unix:/tmp/log,nohostname,facility=local0 notice;
# temp paths
proxy_temp_path /tmp/proxy_temp;