I think the lack of an obvious way to get a useful logging config for local 
development is a pain point we could address.

Here's a patch from a contributor based on a blog post by Dan Poirier [1]:
https://github.com/django/django/pull/4362

Do you think this is a good suggestion or do you have a different way of 
getting useful logging in development?

I experimented a little with using an environment variable to modify parts 
of django.utils.log.DEFAULT_LOGGING to get a useful output if the env var 
is set to DEBUG, but it didn't seem so simple, besides a solution in 
django/utils/log.py like:

if os.environ.get('DJANGO_CONSOLE_DEBUG'):
   DEFAULT_LOGGING = (default logging from pull request above)
else:
  DEFAULT_LOGGING = (existing django.utils.log.DEFAULT_LOGGING)

[1] 
http://www.caktusgroup.com/blog/2015/01/27/Django-Logging-Configuration-logging_config-default-settings-logger/

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f76b4626-754f-4256-acb2-31799606f880%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to