Skip to content

Commit

Permalink
added caller info to log.Info
Browse files Browse the repository at this point in the history
  • Loading branch information
john-deng committed Jan 6, 2022
1 parent d269504 commit 2b2aae7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/log/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ package log

import (
"fmt"
"github.com/kataras/golog"
"github.com/kataras/pio"
"io"
"runtime"

"github.com/kataras/golog"
"github.com/kataras/pio"
)

//
Expand Down Expand Up @@ -182,12 +183,12 @@ func Warnf(format string, args ...interface{}) {

// Info will print when logger's Level is info or debug.
func Info(v ...interface{}) {
golog.Info(v...)
withCaller(golog.Info, v...)
}

// Infof will print when logger's Level is info or debug.
func Infof(format string, args ...interface{}) {
golog.Infof(format, args...)
withCallerf(golog.Infof, format, args...)
}

// Debug will print when logger's Level is debug.
Expand All @@ -197,7 +198,6 @@ func Debug(v ...interface{}) {

// Debugf will print when logger's Level is debug.
func Debugf(format string, args ...interface{}) {

withCallerf(golog.Debugf, format, args...)
}

Expand Down

0 comments on commit 2b2aae7

Please sign in to comment.