Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the discord logger to console. #3213

Closed
2 tasks
Jerrie-Aries opened this issue Oct 1, 2022 · 1 comment · Fixed by #3216
Closed
2 tasks

Log the discord logger to console. #3213

Jerrie-Aries opened this issue Oct 1, 2022 · 1 comment · Fixed by #3216

Comments

@Jerrie-Aries
Copy link
Contributor

Is your feature request related to a problem? Please elaborate.

On version 2.0^, discord.py no longer prints certain errors to sys.stderr but uses the logger instead. Source can be found here.

This is quite difficult/challenging especially when developing plugins or fixing errors where in some cases (without enabling the logger) the bot would eat the errors silently.

Though the bot has already had the LOG_DISCORD config variable but it just logs the errors into the file.
It could be more useful if the errors were logged to the console instead, at least for WARNING level errors.

Describe the solution you'd like

  • Log only DEBUG level errors (if enabled) to the file while other levels higher than that to console. Not sure if this is possible.
  • Probably set the default level (to log to console) to WARNING or INFO, so the users would not need extra step to enable it.

Does your solution involve any of the following?

  • Logviewer
  • New config option

Describe alternatives you've considered

Currently just by enabling the logger using LOG_DISCORD config variable, and looking into the discord.log file for errors.

Who will this benefit?

Users, Contributors and Plugin Developers.

Additional Information

I haven't found a good implementation for this.
Maybe someone could help and look into this.

@StephenDaDev
Copy link
Member

PR Merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants