Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable supervisor logs to stdout/stderr #661

Closed
ymsaout opened this issue Sep 30, 2015 · 4 comments · Fixed by #1301
Closed

disable supervisor logs to stdout/stderr #661

ymsaout opened this issue Sep 30, 2015 · 4 comments · Fixed by #1301
Labels

Comments

@ymsaout
Copy link

ymsaout commented Sep 30, 2015

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.

@crquan
Copy link

crquan commented Nov 30, 2015

👍 request for this feature; in containerized app, I want to show my app logs on stdout/stderr instead of (or together with?) supervisord logs

@vpal
Copy link

vpal commented Sep 7, 2016

👍 for this, having the same issue.

@Jolly23
Copy link

Jolly23 commented May 3, 2017

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

@claudiofreitas
Copy link

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

6 participants