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

Print panic output on Error log level #292

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hanzei
Copy link

@hanzei hanzei commented Nov 10, 2023

First of all, thanks for creating this awesome library! We at Mattermost use it a lot.

If a plugin panics, the panic message goes to stderr of the plugin. Because the log lines don't have any levelled prefix like [ERROR], the panic message would end up in the Debug level. That makes it hard to spot, why a plugin panicked.

The (hacky) solution is to check if any unparsed lines start with panic:. If that is the case, this line and all unparsed following lines go to the Error level. Most likely, these will be the last log lines anyway before the process dies.

I tried adding a test to cover, but that would require spinning up another process (that then panics) to cover this PR.

@hashicorp-cla
Copy link

hashicorp-cla commented Nov 10, 2023

CLA assistant check
All committers have signed the CLA.

@hanzei
Copy link
Author

hanzei commented Dec 6, 2023

@tomhjp Would you mind giving this PR a review?

@hanzei
Copy link
Author

hanzei commented Sep 7, 2024

Anything I can help with to get a review going?

@streamer45
Copy link

@VioletHynes Would your team have some bandwidth to review this one?

@VioletHynes
Copy link
Contributor

Hi there -- this isn't my team's area but I'll try and forward this to the team that owns this. Thanks :)

@streamer45
Copy link

Thanks, appreciate it!

client.go Outdated Show resolved Hide resolved
Co-authored-by: Robert <[email protected]>
@hanzei
Copy link
Author

hanzei commented Dec 17, 2024

@robmonte Gentle reminder to review the PR 😄

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

Successfully merging this pull request may close these issues.

5 participants