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

Support logging to stdout #30

Open
halkeye opened this issue Oct 17, 2019 · 3 comments
Open

Support logging to stdout #30

halkeye opened this issue Oct 17, 2019 · 3 comments

Comments

@halkeye
Copy link
Contributor

halkeye commented Oct 17, 2019

This one I am a little more nervious about so didn't open a PR yet

I generated my own docker image with a few patches
postgres - #28
gunicorn to stdout - #29 (partially)

The other half is updating the LOGGING to let django logs output to gunicorn stdout.
I don't know how you'd want it to be made generic

https://github.com/halkeye-docker/openeats-api/blob/e1980ac34df4791a7452294bee3f873db83e943e/Dockerfile#L18-L33

is my changes

@RyanNoelk
Copy link
Member

That's a good idea and how it should be. All logs from docker files should be sent to std out 👍

@halkeye
Copy link
Contributor Author

halkeye commented Nov 1, 2019

I don't know how to make the change for docker only though. Any pointers? Should I just hide it behind an env and default the env inside docker?

@RyanNoelk
Copy link
Member

I'll need to think about it. Not sure if there is a way for django to detect that it is being run in a docker env. It might just be a case of adding another env variable and throwing it behind an if statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants