You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When handling source, we hard coded to go up to level, which is the caller, but when using Fatalf, it does not call HandleLogWithSource directly, thus the source become logger.go:88 ...
func (l*Logger) Fatal(args...interface{}) {
s:=fmt.Sprint(args...)
if!l.source {
l.h.HandleLog(FatalLevel, time.Now(), s)
} else {
l.h.HandleLogWithSource(FatalLevel, time.Now(), s, caller())
}
l.h.Flush()
// TODO: allow user to register hook to do cleanup before exit directlyos.Exit(1)
}
// FIXME: source line is in correct because we call Fatal in Fatalffunc (l*Logger) Fatalf(formatstring, args...interface{}) {
l.Fatal(fmt.Sprintf(format, args...))
}
The text was updated successfully, but these errors were encountered:
When handling source, we hard coded to go up to level, which is the caller, but when using Fatalf, it does not call
HandleLogWithSource
directly, thus the source becomelogger.go:88
...The text was updated successfully, but these errors were encountered: