Skip to content

Commit

Permalink
Don't panic if we fail to close the log (#2832)
Browse files Browse the repository at this point in the history
Co-authored-by: Gauri Lamunion <[email protected]>
  • Loading branch information
adreed-msft and gapra-msft authored Oct 21, 2024
1 parent a16fe8a commit 6412580
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions common/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ func (jl *jobLogger) CloseLog() {
}

jl.logger.Println("Closing Log")
err := jl.file.Close()
PanicIfErr(err)
_ = jl.file.Close() // If it was already closed, that's alright. We wanted to close it, anyway.
}

func (jl jobLogger) Log(loglevel LogLevel, msg string) {
Expand Down

0 comments on commit 6412580

Please sign in to comment.