Documentation ¶
Index ¶
- func Env() log.Valuer
- func GetLogger() log.Logger
- func ID() log.Valuer
- func Name() log.Valuer
- func NewCronLog(logger log.Logger) cron.Logger
- func NewGormLogger(logger log.Logger) logger.Interface
- func NewK8sLogger(opts ...K8sLoggerOption) log.Logger
- func NewLogger(opts ...ZapLogOption) log.Logger
- func RecoveryHandle(ctx context.Context, req, err interface{}) error
- func Version() log.Valuer
- type GormLogger
- func (l *GormLogger) Error(ctx context.Context, s string, i ...interface{})
- func (l *GormLogger) Info(ctx context.Context, s string, i ...interface{})
- func (l *GormLogger) LogMode(level logger.LogLevel) logger.Interface
- func (l *GormLogger) Trace(ctx context.Context, begin time.Time, ...)
- func (l *GormLogger) Warn(ctx context.Context, s string, i ...interface{})
- type K8sLoggerOption
- type ZapLogOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecoveryHandle ¶
RecoveryHandle 错误处理
Types ¶
type GormLogger ¶
type GormLogger struct {
// contains filtered or unexported fields
}
GormLogger gorm日志实现
func (*GormLogger) Error ¶
func (l *GormLogger) Error(ctx context.Context, s string, i ...interface{})
Error log error
func (*GormLogger) Info ¶
func (l *GormLogger) Info(ctx context.Context, s string, i ...interface{})
Info log info
func (*GormLogger) LogMode ¶
func (l *GormLogger) LogMode(level logger.LogLevel) logger.Interface
LogMode 设置日志等级
type K8sLoggerOption ¶
type K8sLoggerOption func(k *k8sLogger)
K8sLoggerOption k8s日志配置
func WithK8sLoggerLog ¶
func WithK8sLoggerLog(logger klog.Logger) K8sLoggerOption
WithK8sLoggerLog 配置k8s日志
Click to show internal directories.
Click to hide internal directories.