Qix-/better-exceptions

Do you want to work on this issue?

You can request for a bounty in order to promote it!


2 active bounty requests

$40.00$40.00
Solve someone else's bounty request by clicking on it and completing the funding to earn additional credits

Logged exceptions shouldn't contain colour #87

majutsushi posted onGitHub

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!


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?

posted by Qix- almost 6 years ago

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.

posted by majutsushi almost 6 years ago

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.

posted by Qix- almost 6 years ago

Sorry for being unclear earlier!

posted by majutsushi almost 6 years ago

No problem :)

posted by Qix- almost 6 years ago

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

posted by jw-cpnet almost 6 years ago

@issuehunt has funded $50.00 to this issue.


posted by issuehunt-app[bot] over 5 years ago

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

posted by lokesh1729 over 5 years ago

@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.

posted by Qix- over 5 years ago

@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...

posted by lokesh1729 over 5 years ago

Nope, nobody has made progress on it.

posted by Qix- over 5 years ago

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

posted by philippludwig over 5 years ago

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

posted by isaac-philip over 5 years ago

Fund this Issue

$50.00
Funded
Only logged in users can fund an issue

Pull requests

Recent activities

sirwindfield submitted an output to  Qix-/ better-exceptions# 87
over 5 years ago
issuehunt funded 50.00 for Qix-/better-exceptions# 87
over 5 years ago