diff --git a/u_logger.go b/u_logger.go index 520f9da..f7d7043 100644 --- a/u_logger.go +++ b/u_logger.go @@ -1,6 +1,7 @@ package kerbalwzygo import ( + "fmt" "log" "os" "sync" @@ -31,6 +32,11 @@ func (obj *XLogger) Level() Level { return obj.level } +// Printf rewrite for correct 'calldepth' value +func (obj *XLogger) Printf(format string, v ...interface{}) { + _ = obj.Output(3, fmt.Sprintf(format, v...)) +} + func (obj *XLogger) Debug(msg ...interface{}) { if obj.level > Debug { return