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

Logged exceptions shouldn't contain colour #87

Open
majutsushi opened this issue May 20, 2019 · 13 comments · May be fixed by #99
Open

Logged exceptions shouldn't contain colour #87

majutsushi opened this issue May 20, 2019 · 13 comments · May be fixed by #99
Labels
bug 💵 Funded on Issuehunt This issue has been funded on Issuehunt

Comments

@majutsushi
Copy link

majutsushi commented May 20, 2019

Issuehunt badges

Currently if the output is to a terminal, then an exception that gets logged will also include the colour escape codes. This is not really ideal since they will just show up as raw escape codes in most editors, making the log harder to read. So it would be great if the logged exceptions could skip the colour-coding even if the current terminal supports colours. The output to the terminal itself should still be coloured of course. Thanks!


IssueHunt Summary

Backers (Total: $50.00)

Submitted pull Requests


Become a backer now!

Or submit a pull request to get the deposits!

Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@Qix-
Copy link
Owner

Qix- commented May 20, 2019

I'm confused.

Currently if the output is to a terminal, then an exception that gets logged will also include the colour escape codes.

Yes, correct. That's how terminal colors work :p

This is not really ideal since they will just show up as raw escape codes in most editors, making the log harder to read.

Which editors? Where?

So it would be great if the logged exceptions could skip the colour-coding even if the current terminal supports colours.

Why would that be great? That just means no color.

The output to the terminal itself should still be coloured of course

I'm completely lost. What issue are you facing?

@majutsushi
Copy link
Author

I mean that exception colours will also be present in log files that get written when using the logging module, for example when using logging.exception("oops"). These escape codes don't really belong in log files, only in direct terminal output, because editors that you would use to inspect log files are (generally) not terminals.

@Qix-
Copy link
Owner

Qix- commented May 21, 2019

Ohhh, you mean with the logging module. Okay, I agree. I'm not near a computer right now as I'm sick, but I'll try to reproduce in a while.

@majutsushi
Copy link
Author

majutsushi commented May 22, 2019 via email

@Qix-
Copy link
Owner

Qix- commented May 22, 2019

No problem :)

@Qix- Qix- added the bug label May 22, 2019
@jw-cpnet
Copy link

Yes, I'm facing the same issue. Could you please consider adding an option to disable coloring?

@issuehunt-oss
Copy link

issuehunt-oss bot commented Jul 13, 2019

@issuehunt has funded $50.00 to this issue.


@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Jul 13, 2019
@lokesh1729
Copy link

@Qix- @majutsushi any update on this??? as i understand we don't want the color ASCII characters to include while logging to files...

@Qix-
Copy link
Owner

Qix- commented Jul 17, 2019

@lokesh1729 As is with most OSS, if it is not updated on this issue, then there is no update. We don't secretly discuss/code outside of Github. Please don't spam my issues with comments asking for updates.

@lokesh1729
Copy link

@Qix- i understand but my intention is not to spam but to contribute... i want to work on this issue, so "update" i mean is wanted to know if someone has already made a progress on it...

@Qix-
Copy link
Owner

Qix- commented Jul 17, 2019

Nope, nobody has made progress on it.

@philippludwig
Copy link

I can’t reproduce this. Whenever the logging module is involved, nothing of the output is colored. Maybe someone can provide a MCVE.

@mainrs mainrs linked a pull request Sep 4, 2019 that will close this issue
@isaac-philip
Copy link

Hello I c this issue still open? I can have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 💵 Funded on Issuehunt This issue has been funded on Issuehunt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants