Open hanzei opened 11 months ago
@tomhjp Would you mind giving this PR a review?
Anything I can help with to get a review going?
@VioletHynes Would your team have some bandwidth to review this one?
Hi there -- this isn't my team's area but I'll try and forward this to the team that owns this. Thanks :)
Thanks, appreciate it!
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.