We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It appears that importing aiocache into a sanic app causes the sanic logs and print statements to be sent to stdout twice. My app looks like this:
from sanic import Sanic from aiocache import caches app = Sanic(__name__) if __name__ == '__main__': app.run(host='0.0.0.0', port=8080, workers=4, debug=True)
And the logs on start up look like this:
2017-07-12 06:08:17 - (sanic)[DEBUG]: ▄▄▄▄▄ ▀▀▀██████▄▄▄ _______________ ▄▄▄▄▄ █████████▄ / \ ▀▀▀▀█████▌ ▀▐▄ ▀▐█ | Gotta go fast! | ▀▀█████▄▄ ▀██████▄██ | _________________/ ▀▄▄▄▄▄ ▀▀█▄▀█════█▀ |/ ▀▀▀▄ ▀▀███ ▀ ▄▄ ▄███▀▀██▄████████▄ ▄▀▀▀▀▀▀█▌ ██▀▄▄▄██▀▄███▀ ▀▀████ ▄██ ▄▀▀▀▄██▄▀▀▌████▒▒▒▒▒▒███ ▌▄▄▀ ▌ ▐▀████▐███▒▒▒▒▒▐██▌ ▀▄▄▄▄▀ ▀▀████▒▒▒▒▄██▀ ▀▀█████████▀ ▄▄██▀██████▀█ ▄██▀ ▀▀▀ █ ▄█ ▐▌ ▄▄▄▄█▌ ▀█▄▄▄▄▀▀▄ ▌ ▐ ▀▀▄▄▄▀ ▀▀▄▄▀ 2017-07-12 06:08:17,488 DEBUG sanic(691) | ▄▄▄▄▄ ▀▀▀██████▄▄▄ _______________ ▄▄▄▄▄ █████████▄ / \ ▀▀▀▀█████▌ ▀▐▄ ▀▐█ | Gotta go fast! | ▀▀█████▄▄ ▀██████▄██ | _________________/ ▀▄▄▄▄▄ ▀▀█▄▀█════█▀ |/ ▀▀▀▄ ▀▀███ ▀ ▄▄ ▄███▀▀██▄████████▄ ▄▀▀▀▀▀▀█▌ ██▀▄▄▄██▀▄███▀ ▀▀████ ▄██ ▄▀▀▀▄██▄▀▀▌████▒▒▒▒▒▒███ ▌▄▄▀ ▌ ▐▀████▐███▒▒▒▒▒▐██▌ ▀▄▄▄▄▀ ▀▀████▒▒▒▒▄██▀ ▀▀█████████▀ ▄▄██▀██████▀█ ▄██▀ ▀▀▀ █ ▄█ ▐▌ ▄▄▄▄█▌ ▀█▄▄▄▄▀▀▄ ▌ ▐ ▀▀▄▄▄▀ ▀▀▄▄▀ 2017-07-12 06:08:17 - (sanic)[INFO]: Goin' Fast @ http://0.0.0.0:8080 2017-07-12 06:08:17,495 INFO sanic(701) | Goin' Fast @ http://0.0.0.0:8080 2017-07-12 06:08:17 - (sanic)[INFO]: Starting worker [1400] 2017-07-12 06:08:17,513 INFO sanic(449) | Starting worker [1400] 2017-07-12 06:08:17 - (sanic)[INFO]: Starting worker [1401] 2017-07-12 06:08:17,528 INFO sanic(449) | Starting worker [1401] 2017-07-12 06:08:17 - (sanic)[INFO]: Starting worker [1402] 2017-07-12 06:08:17,553 INFO sanic(449) | Starting worker [1402] 2017-07-12 06:08:17 - (sanic)[INFO]: Starting worker [1403] 2017-07-12 06:08:17,557 INFO sanic(449) | Starting worker [1403]
I suspect the issue is due to this line: https://github.com/argaen/aiocache/blob/master/aiocache/log.py#L3
Is there any easy way to fix this behaviour?
The text was updated successfully, but these errors were encountered:
Hi @keattang, yeah I can reproduce. I guess this happens because both sanic and aiocache use bad patterns for how to deal with logging.
See sanic-org/sanic#758
I'll do some changes in the module for aiocache and do a minor release to fix this
Sorry, something went wrong.
Awesome appreciate it!
@keattang this should be fixed in master. Thanks for reporting :)
Awesome thanks!
No branches or pull requests
It appears that importing aiocache into a sanic app causes the sanic logs and print statements to be sent to stdout twice. My app looks like this:
And the logs on start up look like this:
I suspect the issue is due to this line:
https://github.com/argaen/aiocache/blob/master/aiocache/log.py#L3
Is there any easy way to fix this behaviour?
The text was updated successfully, but these errors were encountered: