Skip to content

Log the discord logger to console. #3213

Closed
@Jerrie-Aries

Description

@Jerrie-Aries

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions