discord-modmail / modmail

A Modmail bot for Discord. Allowing safe moderator conversations with server members one server at a time.
https://discord-modmail.readthedocs.io/
MIT License
15 stars 8 forks source link

chore: refactorlogging #40

Closed onerandomusername closed 3 years ago

onerandomusername commented 3 years ago

Is there an existing issue for this?

Current Behavior

The code for logging is terrible. There's double formatters, a bunch of mess, and more.

Expected Behavior

Less code.

Steps To Reproduce

  1. Pull the repo
  2. Run the bot
  3. Logs have a lot of unnecessary code.

Select your hosting method

local hosting

Anything else?

No response

bast0006 commented 3 years ago

Yeah. I'm fixing this up. Deleted a chunk of code but most of it is just required--we want rotating loggers, so we gotta specify file, then durations, etc regardless of what we actually do. We can strip out some of the formatters though because coloredlogs automatically strips ascii codes when not logging to an interactive terminal.