what if we just logg the key to python django level to retrieve logging
info...?
On Tue, Apr 5, 2022 at 6:55 AM 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, e
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':
Django doesn't require a string for log level. The contents of the LOGGING
setting are passed directly to the callable in LOGGING_CONFIG, which
defaults to logging.config.dictConfig, which takes numbers.
Demo:
In [1]: import logging
In [2]: from django.conf import settings
In [3]: import django
How would this work with secret stores like hashicorp vault, aws secrets
manager? Or even via environment variables? This approach would work if
you define the logging level in your configuration, but not so friendly for
other approaches.
On Monday, April 4, 2022 at 9:26:02 PM UTC-4 Dan Swain
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
{ 'le