v0.0.567 Add ListenerOpt to exerr.RegisterListener (this is a breking API change !! -- but will prevent more breakage later on...)
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m33s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m33s
This commit is contained in:
@@ -435,7 +435,7 @@ func (b *Builder) BuildAsExerr(ctxs ...context.Context) *ExErr {
|
||||
b.errorData.ShortLog(pkgconfig.ZeroLogger.Error())
|
||||
}
|
||||
|
||||
b.errorData.CallListener(MethodBuild)
|
||||
b.errorData.CallListener(MethodBuild, ListenerOpt{NoLog: b.noLog})
|
||||
|
||||
return b.errorData
|
||||
}
|
||||
@@ -459,7 +459,7 @@ func (b *Builder) Output(ctx context.Context, g *gin.Context) {
|
||||
b.errorData.Log(pkgconfig.ZeroLogger.Warn())
|
||||
}
|
||||
|
||||
b.errorData.CallListener(MethodOutput)
|
||||
b.errorData.CallListener(MethodOutput, ListenerOpt{NoLog: b.noLog})
|
||||
}
|
||||
|
||||
// Print prints the error
|
||||
@@ -481,7 +481,7 @@ func (b *Builder) Print(ctxs ...context.Context) Proxy {
|
||||
b.errorData.ShortLog(pkgconfig.ZeroLogger.Debug())
|
||||
}
|
||||
|
||||
b.errorData.CallListener(MethodPrint)
|
||||
b.errorData.CallListener(MethodPrint, ListenerOpt{NoLog: b.noLog})
|
||||
|
||||
return Proxy{v: *b.errorData} // we return Proxy<Exerr> here instead of Exerr to prevent warnings on ignored err-returns
|
||||
}
|
||||
@@ -502,7 +502,7 @@ func (b *Builder) Fatal(ctxs ...context.Context) {
|
||||
|
||||
b.errorData.Log(pkgconfig.ZeroLogger.WithLevel(zerolog.FatalLevel))
|
||||
|
||||
b.errorData.CallListener(MethodFatal)
|
||||
b.errorData.CallListener(MethodFatal, ListenerOpt{NoLog: b.noLog})
|
||||
|
||||
os.Exit(1)
|
||||
}
|
||||
|
Reference in New Issue
Block a user