Skip to content

Commit

Permalink
support/log: allow setting exit function
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Feb 6, 2025
1 parent 5cf7ddc commit da5bd14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions support/log/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ func (e *Entry) SetLevel(level logrus.Level) {
e.entry.Logger.SetLevel(level)
}

func (e *Entry) SetExitFun(exitFun func(int)) {
e.entry.Logger.ExitFunc = exitFun
}

func (e *Entry) UseJSONFormatter() {
formatter := new(logrus.JSONFormatter)
formatter.TimestampFormat = timeStampFormat
Expand Down

0 comments on commit da5bd14

Please sign in to comment.