Skip to content
This repository has been archived by the owner on Feb 13, 2025. It is now read-only.

Commit

Permalink
docs: add exit docs to custom logger
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Gleich <git@mattglei.ch>
  • Loading branch information
gleich committed Jul 25, 2024
1 parent b20ac36 commit 806318c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ func (config Logger) ErrorMsg(ctx ...interface{}) {
logError(config, errorStatus, time.Now(), nil, ctx...)
}

// Output a fatal log using a custom logger
// Output a fatal log using a custom logger. Will exit program after logging
func (config Logger) Fatal(err error, ctx ...interface{}) {
logError(config, fatalStatus, time.Now(), err, ctx...)
os.Exit(config.ExitCode)
}

// Output a fatal log with no actual error value using a custom logger
// Output a fatal log with no actual error value using a custom logger. Will exit program after logging
func (config Logger) FatalMsg(ctx ...interface{}) {
logError(config, fatalStatus, time.Now(), nil, ctx...)
os.Exit(config.ExitCode)
Expand Down

0 comments on commit 806318c

Please sign in to comment.