django-grpc
django-grpc copied to clipboard
Use Python logging module
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?
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
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.
That's true. Can you open pull request? I'm short of time right now