File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ type StandardLogger struct {
2525 archiveDir string
2626 archiveFile * os.File
2727 outFile * os.File
28- exitFunc func ()
28+ exitFunc func (msg string , args ... any )
2929}
3030
3131type LoggerOptions func (* StandardLogger )
@@ -70,7 +70,7 @@ func WithArchiveDirectory(path string) LoggerOptions {
7070 }
7171}
7272
73- func WithExitFunc (exit func ()) LoggerOptions {
73+ func WithExitFunc (exit func (msg string , args ... any )) LoggerOptions {
7474 return func (logger * StandardLogger ) {
7575 logger .exitFunc = exit
7676 }
@@ -276,7 +276,7 @@ func (l *StandardLogger) Fatalf(msg string, args ...any) {
276276 switch l .mode {
277277 case Text :
278278 l .PlainTextError (fmt .Sprintf (msg , args ... ))
279- l .exitFunc ()
279+ l .exitFunc (msg , args ... )
280280 return
281281 case Hidden :
282282 return
@@ -438,6 +438,6 @@ func (l *StandardLogger) syncLoggerFormat() {
438438 }
439439}
440440
441- func defaultExit () {
441+ func defaultExit (_ string , args ... any ) {
442442 os .Exit (1 )
443443}
You can’t perform that action at this time.
0 commit comments