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

Gunicorn logging configuration needs "accesslog" configuration specified to work #2916

Closed
crisidev opened this issue Apr 5, 2018 · 4 comments
Labels

Comments

@crisidev
Copy link
Contributor

crisidev commented Apr 5, 2018

access_log = self.log.access_log if self.cfg.accesslog else None

This line enforce having the directive "accesslog" configured in my gunicorn configuration and my code is handling logs using standard python logging configuration, getting loggers for gunicorn.access and gunicorn.error

With accesslog configured in my gunicorn config to /tmp/alogfile, my logging configuration intercepts gunicorn.access and all the access logs go to the file referenced by my custom handler, but a empty file /tmp/alogfile gets configured upon every startup.

@crisidev
Copy link
Contributor Author

crisidev commented Apr 5, 2018

Hum, looks like this can be solved just setting accesslog = "-" in the gunicorn config.

I don't know if this issue is still relevant, feel free to resolve it.

Maybe a note in your public documentation would be nice since you state that gunicorn access log should work basically out of the box assuming the log format follows aiohttp standards.

@asvetlov
Copy link
Member

asvetlov commented Apr 5, 2018

If you have ideas for documentation improvement -- please make a Pull Request.

@crisidev
Copy link
Contributor Author

I think we can close this since the documentation PR has been resolved.

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants