On Tue, 5 Apr 2022, at 09:26, Dan Swain wrote: > The current Django LOGGING setup requires a string for the "level". This is > not intuitive since the Python logging module defines logging.DEBUG, > logging.INFO, etc. I think one should be able to configure the logging level > using { 'level': logging.DEBUG } rather than being required to use { > 'level': 'DEBUG' }.
It's worth noting that Django, by default, uses python's own `logging.config.dictConfig` to process the LOGGING config object - https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig Since Python 3.2 `setLevel` has supported being passed a string of the name of the level: https://docs.python.org/3/library/logging.html#logging.Logger.setLevel So the feature you're referring to is one from Python's stdlib. Note: there is nothing to stop you from using `logging.DEBUG` if you prefer. -- Curtis -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/4556994f-4aa8-4512-a31d-b898216a8b74%40www.fastmail.com.