You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For consistency with the rest of the code, use single-quoted strings
printf style string formatting should not be used, use the modern formatting methods (.format/f-strings) instead
There really isn't any reason for formatting at all, the level names don't change, so you can just write out the level name + console colour codes for each, also saves the unnecessary string concatenation with the RESET part
The way this is currently done would affect both the console and file log handlers, the logfile should not contain terminal control characters and remain plain text, you may have to introduce a separate log formatter for console logging
Hmm, this is a good point. I don't feel particularly comfortable importing a dependency just to colour logs. I'll do some further digging. Do we want to support cmd on Windows 10 as the minimum?
Yeah, somewhat selfishly since I do most of my work on windows, so it should work there. Haven't tested in powershell, but no sane person uses powershell.
I don't feel particularly comfortable importing a dependency just to colour logs.
The bot is already using third party requirements (requirements.txt), so I don't see why it would be a bad thing. I personally believe that it's better to depend a package that results in more readable code than it is to try to build in that functionality myself in situations like this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a few minutes of using the bot, I realised it'd benefit from some basic colour coding for logging levels.