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

Dev: Logging #25

Closed
TylerBloom opened this issue Jun 12, 2022 · 3 comments
Closed

Dev: Logging #25

TylerBloom opened this issue Jun 12, 2022 · 3 comments
Assignees
Labels
feature Some new is requested in progress Actively being worked on

Comments

@TylerBloom
Copy link
Member

Currently, there is no logging happening in the v2 pre-release. This will make fixing bugs rather difficult.

Ideally, any panics or issues with Discord would be logged locally and, when possible, sent to the error log on the dev server. The after_command event handler should be helpful for this.

@TylerBloom TylerBloom added this to the Version 2.0 Release milestone Jun 12, 2022
@TylerBloom TylerBloom self-assigned this Jun 12, 2022
@TylerBloom TylerBloom added the feature Some new is requested label Jun 12, 2022
@TylerBloom TylerBloom changed the title Logging Dev: Logging Jun 12, 2022
@TylerBloom TylerBloom added the todo Will be resolved but work hasn't started label Jun 19, 2022
@TylerBloom TylerBloom removed their assignment Jun 21, 2022
@TylerBloom
Copy link
Member Author

Serenity puts its panic handler around the calls to before and after. So, if the command fails, after is never called. The best possible solution is likely to add a listener. The before and after methods can pass actions to the listener via a channel. If the listener finds an action that lives for more than some amount of time, say 5 seconds, we will assume there was a panic and log the context.

In order to construct a better crash context, every command could track its progress and send messages to the listener. The listener could then piece together a crash context from these messages.

@TylerBloom
Copy link
Member Author

This approach will also provide us with the tools to track general performance metrics.

@TylerBloom TylerBloom self-assigned this Sep 30, 2022
@TylerBloom TylerBloom added in progress Actively being worked on and removed todo Will be resolved but work hasn't started labels Sep 30, 2022
TylerBloom added a commit that referenced this issue Sep 30, 2022
@TylerBloom
Copy link
Member Author

The logging should also include telemetry. Having daily or weekly reports on this would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Some new is requested in progress Actively being worked on
Projects
Development

No branches or pull requests

1 participant