gunicorn/examples/logging.conf
benoitc 8e80328114 add support for logging configuration using a ini file. It uses the
standard Python logging's module Configuration file format
(http://docs.python.org/library/logging.html#configuration-file-format)
and allows anyone to use his custom file handler. Fix issues #117 and #111.
2010-12-12 16:13:10 +01:00

34 lines
503 B
Plaintext

[loggers]
keys=root, gunicorn
[handlers]
keys=console, file
[formatters]
keys=generic
[logger_root]
level=INFO
handlers=console
[logger_gunicorn]
level=DEBUG
handlers=file
propagate=1
qualname=gunicorn
[handler_console]
class=StreamHandler
formatter=generic
args=(sys.stdout, )
[handler_file]
class=logging.FileHandler
formatter=generic
args=('/tmp/test.log',)
[formatter_generic]
format="%(asctime)s [%(process)d] [%(levelname)s] %(message)s"
datefmt="%Y-%m-%d %H:%M:%S"
class=logging.Formatter