46 lines
908 B
Go
Executable File
46 lines
908 B
Go
Executable File
package loggerx
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.wishpal.cn/wishpal_ironfan/xframe/component/logger"
|
|
)
|
|
|
|
type Logger struct {
|
|
}
|
|
|
|
func (l Logger) Debug(args ...interface{}) {
|
|
if len(args) <= 0 {
|
|
return
|
|
}
|
|
logger.WithContext(context.Background()).WithCallerSkip(2).Debugln(args...)
|
|
}
|
|
|
|
func (l Logger) Info(args ...interface{}) {
|
|
if len(args) <= 0 {
|
|
return
|
|
}
|
|
logger.WithContext(context.Background()).WithCallerSkip(2).Infoln(args...)
|
|
}
|
|
|
|
func (l Logger) Warn(args ...interface{}) {
|
|
if len(args) <= 0 {
|
|
return
|
|
}
|
|
logger.WithContext(context.Background()).WithCallerSkip(2).Warnln(args...)
|
|
}
|
|
|
|
func (l Logger) Error(args ...interface{}) {
|
|
if len(args) <= 0 {
|
|
return
|
|
}
|
|
logger.WithContext(context.Background()).WithCallerSkip(2).Errorln(args...)
|
|
}
|
|
|
|
func (l Logger) Fatal(args ...interface{}) {
|
|
if len(args) <= 0 {
|
|
return
|
|
}
|
|
logger.WithContext(context.Background()).WithCallerSkip(2).Fatalln(args...)
|
|
}
|