Skip to content

Commit

Permalink
Send access and error logs to stdout and stderr (#12)
Browse files Browse the repository at this point in the history
* Set nginx output logs to stdout/stderr

* Terminate lines

* Remove `set -x` unless DEBUG is set
  • Loading branch information
ChrisAubuchon authored and langston-barrett committed Jul 15, 2016
1 parent db18e29 commit aeccffb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
worker_processes 1;
error_log /dev/stderr;

events {
worker_connections 1024;
Expand All @@ -11,5 +12,7 @@ http {
sendfile on;
keepalive_timeout 65;

access_log /dev/stdout;

include /etc/nginx/conf/*.conf;
}
3 changes: 2 additions & 1 deletion scripts/nginx-run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -x
#set the DEBUG env variable to turn on debugging
[[ -n "$DEBUG" ]] && set -x

if [ ! -s /etc/nginx/nginx.conf ]; then
exit 0
Expand Down

0 comments on commit aeccffb

Please sign in to comment.