From 0d580561327e0ae379801d3cc10444b504922608 Mon Sep 17 00:00:00 2001 From: shouse-cars Date: Tue, 8 May 2012 16:25:53 -0700 Subject: [PATCH] Added note about using Gunicorn with logrotate. --- doc/site/deploy.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/site/deploy.rst b/doc/site/deploy.rst index 9719156c..a8e8c43e 100644 --- a/doc/site/deploy.rst +++ b/doc/site/deploy.rst @@ -184,6 +184,15 @@ Another useful tool to monitor and control Gunicorn is Supervisor_. A autorestart=true redirect_stderr=True +Logging +------- + +Logging can be configured by using various flags detailed in the +`configuration documentation`_ or by creating a `logging configuration file`_. +Send the ``USR1`` signal to rotate logs if you are using the logrotate +utility:: + + kill -USR1 $(cat /var/run/gunicorn.pid) .. _Nginx: http://www.nginx.org .. _slowloris: http://ha.ckers.org/slowloris/ @@ -192,4 +201,6 @@ Another useful tool to monitor and control Gunicorn is Supervisor_. A .. _`example service`: http://github.com/benoitc/gunicorn/blob/master/examples/gunicorn_rc .. _Supervisor: http://supervisord.org .. _`simple configuration`: http://github.com/benoitc/gunicorn/blob/master/examples/supervisor.conf +.. _`configuration documentation`: http://gunicorn.org/configure.html#logging +.. _`logging configuration file`: https://github.com/benoitc/gunicorn/blob/master/examples/logging.conf .. _Virtualenv: http://pypi.python.org/pypi/virtualenv