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

Log level settings should accept strings (eg "INFO") #51

Open
therefromhere opened this issue Aug 27, 2018 · 2 comments
Open

Log level settings should accept strings (eg "INFO") #51

therefromhere opened this issue Aug 27, 2018 · 2 comments

Comments

@therefromhere
Copy link
Contributor

therefromhere commented Aug 27, 2018

For consistency with Python's logging config (and to avoid having to import logging into settings), we should probably allow the REQUEST_LOGGING_DATA_LOG_LEVEL and REQUEST_LOGGING_HTTP_4XX_LOG_LEVEL settings to be set as strings ("INFO" etc) as well as the enum values from logging (logging.INFO etc).

@joeyworld
Copy link
Contributor

joeyworld commented Sep 6, 2018

Can I also write my opinion?

This seems related with #47 since it introduces with new settings.
I'm actually positive with introducing a set of project-level settings, as long as well-written documentation is provided!

@tclancy
Copy link
Contributor

tclancy commented Sep 6, 2018

I don't really see a crossover as #47 doesn't seem to need a setting, but I am ok in general with the idea of making a package-level settings like Django Rest Framework or Debug Toolbar rather than a series of individual REQUEST_LOGGER_X settings if that's what you mean. OTOH, backwards compatibility would be a concern.

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

3 participants