Qix- / better-exceptions

Pretty and useful exceptions in Python, automatically.
MIT License
4.59k stars 203 forks source link

remove color from log files #99

Open mainrs opened 5 years ago

mainrs commented 5 years ago

This PR removes the color from logfiles while keeping them if they are outputted to the console. This is done by additionally filtering for FileHandlers during the hook call.

I also added a new test that explicitly creates a log file. The file doesn't contain any ANSI codes after the test has run.

I am not sure if the output has to be re-generated. Best would be if you could take a look before merging it. If they do need ot re-generate, let me know. I'll add them in a new commit.

Closes #87.


IssueHunt Summary ### Referenced issues This pull request has been submitted to: - [#87: Logged exceptions shouldn't contain colour](https://issuehunt.io/repos/84720080/issues/87) --- IssueHunt has been backed by the following sponsors. [Become a sponsor](https://issuehunt.io/membership/members)
mainrs commented 5 years ago

@Qix- I re-generated the tests after taking a closer look at them. I have no idea why 3 still fail. I am pretty sure I did everything correctly when generating them. Mind taking a closer look?

mainrs commented 4 years ago

I'll close the issue as there is apparently no interest in merging the changes right now.

Qix- commented 4 years ago

I don't understand why people close PRs because maintainers are busy. I'm starting a company and clearly the other maintainer is also busy. There is of course interest, but by closing this PR it leaves me no choice but to disregard your changes. You've made that decision for me.

Feel free to re-open the PR. You're not losing anything by doing so. I will get to this when I have more time.

mainrs commented 4 years ago

I was cleaning up my PR section on GitHub as I use it to keep an overview on stuff and it clutters a lot over time. No problem, I can re-open it.

Qix- commented 4 years ago

Out of experience of almost (over? dunno) 10 years on the platform - that's a lost cause, and you're only going to annoy other maintainers as well. The issues/pr tabs aren't a good tool for that - I'm surprised Github has kept them around all these years.

OSS evolves both rapidly and very slowly, depending on the project. Prepare for some of your PRs to go unnoticed for years and then randomly merged after a while.

mainrs commented 4 years ago

Sorry, I didn't meant to annoy or upset you in any way. The tabs worked (at least for me) great now. I'd take recommendations for other tools/interfaces to manage issues and PRs though :) They bulk up a lot over time and it's hard to keep track of them when not closing some of them after a long period of time.