Documentation ¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func DebugContext(ctx context.Context, args ...interface{})
- func DebugContextf(ctx context.Context, format string, args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func ErrorContext(ctx context.Context, args ...interface{})
- func ErrorContextf(ctx context.Context, format string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func FatalContext(ctx context.Context, args ...interface{})
- func FatalContextf(ctx context.Context, format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func GetLogger() *zap.SugaredLogger
- func Info(args ...interface{})
- func InfoContext(ctx context.Context, args ...interface{})
- func InfoContextf(ctx context.Context, format string, args ...interface{})
- func Infof(format string, args ...interface{})
- func InitLogger(fileName string, maxSize, maxBackups, maxAge, level, callerSkip int)
- func NewZapGormLogger() logger.Interface
- func Warn(args ...interface{})
- func WarnContext(ctx context.Context, args ...interface{})
- func WarnContextf(ctx context.Context, format string, args ...interface{})
- func Warnf(format string, args ...interface{})
- type ZapGormLogger
- func (l ZapGormLogger) Error(ctx context.Context, s string, i ...interface{})
- func (l ZapGormLogger) Info(ctx context.Context, s string, i ...interface{})
- func (l ZapGormLogger) LogMode(level logger.LogLevel) logger.Interface
- func (l ZapGormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l ZapGormLogger) Warn(ctx context.Context, s string, i ...interface{})
Constants ¶
View Source
const (
LoggerTag = "logger"
)
Variables ¶
This section is empty.
Functions ¶
func DebugContextf ¶
DebugContextf .
func ErrorContextf ¶
ErrorContextf .
func FatalContextf ¶
FatalContextf .
func GetLogger ¶
func GetLogger() *zap.SugaredLogger
func InfoContextf ¶
InfoContextf .
func InitLogger ¶
func WarnContextf ¶
WarnContextf .
Types ¶
type ZapGormLogger ¶
type ZapGormLogger struct {
// contains filtered or unexported fields
}
ZapGormLogger 给gorm适配使用的logger
func (ZapGormLogger) Error ¶
func (l ZapGormLogger) Error(ctx context.Context, s string, i ...interface{})
Error .
func (ZapGormLogger) Info ¶
func (l ZapGormLogger) Info(ctx context.Context, s string, i ...interface{})
Info .
func (ZapGormLogger) LogMode ¶
func (l ZapGormLogger) LogMode(level logger.LogLevel) logger.Interface
LogMode .
Click to show internal directories.
Click to hide internal directories.