Skip to content

Commit

Permalink
print error logs on stderr and access logs on stdout
Browse files Browse the repository at this point in the history
fix #1184
  • Loading branch information
benoitc committed May 2, 2016
1 parent 5fa32a6 commit 65db610
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions gunicorn/glogging.py
Expand Up @@ -52,17 +52,29 @@
"root": {"level": "INFO", "handlers": ["console"]},
"gunicorn.error": {
"level": "INFO",
"handlers": ["console"],
"handlers": ["error_console"],
"propagate": True,
"qualname": "gunicorn.error"
},

"gunicorn.access": {
"level": "INFO",
"handlers": ["console"],
"propagate": True,
"qualname": "gunicorn.access"
}
},
handlers={
"console": {
"class": "logging.StreamHandler",
"formatter": "generic",
"stream": "sys.stdout"
}
},
"error_console": {
"class": "logging.StreamHandler",
"formatter": "generic",
"stream": "sys.stderr"
},
},
formatters={
"generic": {
Expand Down

0 comments on commit 65db610

Please sign in to comment.