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

Support option to disable color escapes in the log #3729

Closed
danny0838 opened this issue Aug 15, 2020 · 4 comments
Closed

Support option to disable color escapes in the log #3729

danny0838 opened this issue Aug 15, 2020 · 4 comments

Comments

@danny0838
Copy link

Flask always generates color escapes in the log for each HTTP request once color package is installed, but color escapes are undesired for systems that don't support it (such as Windows) and when the log is to be written to a file.

I think we can add an option to disable generating the color escapes.

@davidism
Copy link
Member

This is a bug with how color is added, there's an open issue in Werkzeug (on mobile, can't find it right now). We won't be adding a flag to disable it.

@danny0838
Copy link
Author

danny0838 commented Aug 15, 2020

This is a bug with how color is added, there's an open issue in Werkzeug (on mobile, can't find it right now). We won't be adding a flag to disable it.

You probably mean pallets/werkzeug#1832. But I don't think the argument is valid: even if it can be fixed to work with windows console, there's still a need to disable color escapes when the log is to be written to a file.

@danny0838
Copy link
Author

danny0838 commented Aug 20, 2020

Is there further reason for rejecting the request? Or should I open another issue for it for the changed purpose?

@davidism
Copy link
Member

I don't plan on adding a switch, please do not open a new issue for that.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants