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

Use Python logging module #18

Open
dragonpaw opened this issue Oct 28, 2021 · 3 comments
Open

Use Python logging module #18

dragonpaw opened this issue Oct 28, 2021 · 3 comments

Comments

@dragonpaw
Copy link

dragonpaw commented Oct 28, 2021

In a couple places in the grpcserver command you have self.stdout.write which doesn't really play well with customized logging setups. Would it be possible for these to be logging.info() or logging.debug() calls instead?

@gluk-w
Copy link
Owner

gluk-w commented Nov 12, 2021

I used Django's approach that outputs everything into stdout or stderr
https://github.com/django/django/blob/main/django/core/management/commands/runserver.py#L130

@dragonpaw
Copy link
Author

Runserver isn't meant for production use though. For production Django you use the wsgi interface which doesn't log anything to stderr/stdout. So I figured this should be used in the same way as wsgi.

@gluk-w
Copy link
Owner

gluk-w commented Nov 12, 2021

That's true. Can you open pull request? I'm short of time right now

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