Hi,
I use a configuration to send nginx logs to stdout in my docker container, thanks to this, I can have nginx access and error logs with docker logs, I want to find a way to just have nginx logs and not supervisor process logs. Here is my configuration :
[supervisord]
loglevel=error
[program:php5-fpm]
command=/usr/sbin/php5-fpm -c /etc/php5/fpm
[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
[program:nginx-log-access]
command=tail -f /var/log/nginx/access.log
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
[program:nginx-log-error]
command=tail -f /var/log/nginx/error.log
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
FROM debian:jessie
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install \
nginx supervisor php5-fpm php5-mysql php5-curl curl python-setuptools && \
/usr/bin/easy_install supervisor && /usr/bin/easy_install supervisor-stdout
...
CMD ["/usr/bin/supervisord", "-n"]
Is there a way to just log in the supervisor log file and not stdout/stderr ?
Thank you.
:+1: request for this feature; in containerized app, I want to show my app logs on stdout/stderr instead of (or together with?) supervisord logs
:+1: for this, having the same issue.
Great, I have the same issue.
Could you willing to teach me how to fix some problems when using supervisor in docker container?
Here is my problem on stackoverflow
If it serves as help to anyone, the current workaround I am using is setting loglevel=critical in the supervisord.conf file so that only critical log levels get sent to stdout (from supervisor itself, not child). At least it reduces considerably the amount of "noise".
Most helpful comment
:+1: request for this feature; in containerized app, I want to show my app logs on stdout/stderr instead of (or together with?) supervisord logs