TrustyJAID / Trusty-cogs

A variety of utility cogs and fun cogs including Hockey information from the NHL, badge creation from discord user information, starboard for use on Redbot, twitch follow notifications and more.
MIT License
164 stars 120 forks source link

Some logging enhancements #317

Closed Drapersniper closed 1 year ago

Drapersniper commented 1 year ago

P.s I run black . and isort .` but it also touched some of the other files, if that's not what you use on the repo let me know so I can run it again to revert some of the black changes.

P.s Consider this more of a starting point than the final PR due to my lack of familiarity with the repo I may have made some incorrect assumptions.

Logic used:

Any line of log that just logged a variable was moved to verbose Any log statement happening in a while/for loop and events was moved to trace Any debug lines with user input on commands were moved to verbose

Some errors that did not cause the functionality to exit early were changed to a warning Any log statement that just logged a variable has some additional context added to ti All translated log lines were changed back to literal Every fstring/formatted log line was moved over to lazy formatting so that the formatting doesn't take place unless the logger is actually enabled for that statement (this improves logging performance)