ruby on rails - how to stop dockerized nginx in foreground from flooding logs? -


i'm running nginx , unicorn in docker container managed supervisord.
so, supervisord docker command. in turn spawns nginx , unicorn. unicorn talks nginx on socket. nginx listens on port 80.

i have logspout docker container running, piping docker logs papertrail listening docker.sock.

the problem nginx spewing thousands of mundane entries logs:

172.31.45.231 - - [25/may/2016:05:53:33 +0000] "get / http/1.0" 200 12961 0.0090

i'm trying disable it.

so far i've:

  1. set access_logs /dev/null; in nginx.conf , vhost files.

  2. tried tell supervisord stop logging requests

    [program:nginx] command=bash -c "/usr/sbin/nginx -c /etc/nginx/nginx.conf" stdout_logfile=/dev/null stderr_logfile=/dev/null

  3. tried tell supervisord send logs syslog not stdout:

    [program:nginx] command=bash -c "/usr/sbin/nginx -c /etc/nginx/nginx.conf" stdout_logfile=syslog stderr_logfile=syslog

  4. set log level in unicorn warn in rails code, , via env var.

full supervisord conf:

[supervisord] nodaemon=true loglevel=warn   [program:unicorn] command=bundle exec unicorn -c /railsapp/config/unicorn.rb process_name=%(program_name)s_%(process_num)02d numprocs=1 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 redirect_stderr=true   [program:nginx] command=bash -c "/usr/sbin/nginx -c /etc/nginx/nginx.conf" stdout_logfile=/dev/null stderr_logfile=/dev/null 

you try , change nginx log level a:

access_log  off; 

the goal remains modify nginx.conf used nginx image.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -