diff --git a/gokit.go b/gokit.go index 06ff1f4..f1426b0 100644 --- a/gokit.go +++ b/gokit.go @@ -90,8 +90,8 @@ func getLevelName(level Level) string { func format(msg string) string { if withCaller { - funcName, file, line, _ := runtime.Caller(2) - return fmt.Sprintf("%s [%s] %s:%d::%s %s \n", time.Now().Format("2006-01-02 15:04:05.999"), logLevelName, file, line, funcName, msg) + _, file, line, _ := runtime.Caller(3) + return fmt.Sprintf("%s [%s] %s:%d %s \n", time.Now().Format("2006-01-02 15:04:05.999"), logLevelName, file, line, msg) } else { return fmt.Sprintf("%s [%s] %s \n", time.Now().Format("2006-01-02 15:04:05.999"), logLevelName, msg) }