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

change log level in the default log formatter #1078

Closed
amrrbakry opened this issue Nov 15, 2019 · 4 comments
Closed

change log level in the default log formatter #1078

amrrbakry opened this issue Nov 15, 2019 · 4 comments

Comments

@amrrbakry
Copy link
Contributor

amrrbakry commented Nov 15, 2019

Hello,

currently, there's no option to specify the log level in the default formatter. I think it would be better if we're able to do that. what do you guys think?

If I implement my own formatter to solve this, will I be able to log the headers/body of the request?

@iMacTia
Copy link
Member

iMacTia commented Nov 18, 2019

Hello @amrrbakry,
you're right, the default formatter uses info and debug log levels and doesn't currently allow you to change that.

We'd be happy to review a PR that adds the possibility to configure that.

You can also implement your own formatter as you said, where you'll have full control of what log level to use. That formatter could inherit from the default one (so you could reuse methods like apply_filters) and you can provide it to the logging middleware as an option.

@amrrbakry
Copy link
Contributor Author

Hi @iMacTia,

I'd be happy to help with this. I will try to send a PR as soon as possible 👍

@amrrbakry
Copy link
Contributor Author

@iMacTia r?

@iMacTia
Copy link
Member

iMacTia commented Feb 9, 2020

Fixed in #1079 🎉

@iMacTia iMacTia closed this as completed Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants