Skip to content

logrus.Panic and async hook don't work well together #46

@glasser

Description

@glasser

When doing a logrus.Fatal or logrus.Panic, it would be good if an async hook got flushed. With Fatal, this is doable because you can use logrus.RegisterExitHandler to call Flush. But you can't do that for Panic. Is it possible to get a Panic out with an async hook?

I'm thinking maybe Fire should ignore hook.asynchronous for the Panic level (and honestly maybe for the Fatal level too, so you don't have to hook up a Flush).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions