sirupsen / logrus

Structured, pluggable logging for Go.
MIT License
24.59k stars 2.27k forks source link

entry.Log at Fatal does not exit #1361

Closed briskt closed 1 year ago

briskt commented 1 year ago

As described in the README, log.Fatal calls os.Exit(1) and log.Panic calls panic(). However, using entry.Log calls panic() at Panic level, but does nothing other than emitting the entry at Fatal level.

This is documented in the code here:

// Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit.
// For this behaviour Entry.Panic or Entry.Fatal should be used instead.

It's not clear whether the code documentation is correct or if the behavior of the code is correct. Either way, it should be consistent and possibly documented at a more visible level, such as in the README.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.