How to hook into the python logging output?
Closed this issue · 4 comments
I can definitely the gunicorn traffic logs when running make dev
.
However, it would be nice for me to access the logfiles created by the python logging
library.
I see you configured the loggers to output to stderr which means it is difficult to access from outside.
Perhaps you use a nice equivalent to tail -f /var/log/my_logfile
?
Hi!
We run the application in Docker containers. So you can reach the logs (that are printed to stdout) by running docker logs --tail <container-name>
Thank you @emanuelen5 😄 that does provide me the stdout which I believe the running docker compose also provides? I believe I am unable to see stderr ?
I don't think stderr is treated differently (did a quick web search). I'm pretty sure it should also be printed to that output.
You are absolutely right, I had overlooked the lines I was logging