Skip to content

Commit

Permalink
Update logging (#87)
Browse files Browse the repository at this point in the history
* add more test logging

* update error_log directive in Docker Nginx config to match real BOSH job configuration

* update log for content-type behavior to use ngx.NOTICE level so that it gets logged correctly
  • Loading branch information
markdboyd authored Jun 26, 2024
1 parent 50f3187 commit 5ca31bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
worker_processes 4;

error_log stderr debug;
error_log stderr notice;

worker_rlimit_nofile 40000;

Expand Down Expand Up @@ -119,7 +119,7 @@ http {

header_filter_by_lua_block {
if ngx.var.upstream_http_content_type == nil and ngx.var.mapped_content_type == "" then
ngx.log(ngx.INFO, "no Content-Type header")
ngx.log(ngx.NOTICE, "no Content-Type header was mapped for upstream status code ", ngx.var.upstream_status)
end
}
Expand Down
4 changes: 2 additions & 2 deletions jobs/secureproxy/templates/config/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ http {

header_filter_by_lua_block {
if ngx.var.upstream_http_content_type == nil and ngx.var.mapped_content_type == "" then
ngx.log(ngx.INFO, "no Content-Type header")
ngx.log(ngx.NOTICE, "no Content-Type header was mapped for upstream status code ", ngx.var.upstream_status)
end
}

Expand Down Expand Up @@ -294,7 +294,7 @@ server {

header_filter_by_lua_block {
if ngx.var.upstream_http_content_type == nil and ngx.var.mapped_content_type == "" then
ngx.log(ngx.INFO, "no Content-Type header")
ngx.log(ngx.NOTICE, "no Content-Type header was mapped for upstream status code ", ngx.var.upstream_status)
end
}

Expand Down

0 comments on commit 5ca31bc

Please sign in to comment.