Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugs(args ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Errors(args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatals(args ...interface{})
- func GRPCUnaryClientRequestLogging() grpc.UnaryClientInterceptor
- func GRPCUnaryClientTraceLog(l *Logger) grpc.UnaryClientInterceptor
- func GRPCUnaryServerRequestLogging() grpc.UnaryServerInterceptor
- func GRPCUnaryServerTraceLog(l *Logger) grpc.UnaryServerInterceptor
- func HTTPServerTraceLog(l *Logger) gin.HandlerFunc
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Infos(args ...interface{})
- func InitLogger(opts ...*Option)
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Panics(args ...interface{})
- func RestyLogging() func(c *resty.Client, res *resty.Response) error
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warns(args ...interface{})
- func WithRestyTraceLog(l *Logger) func(*resty.Client, *resty.Request) error
- func WithTraceCtx(l *Logger, ctx context.Context) context.Context
- type GormLogger
- func (w GormLogger) Error(_ context.Context, msg string, data ...interface{})
- func (w GormLogger) Info(_ context.Context, msg string, data ...interface{})
- func (w *GormLogger) Log(keyvals ...interface{}) error
- func (w *GormLogger) LogMode(level glogger.LogLevel) glogger.Interface
- func (w GormLogger) Trace(_ context.Context, begin time.Time, fc func() (string, int64), err error)
- func (w GormLogger) Warn(_ context.Context, msg string, data ...interface{})
- type JaegerLogger
- type KcronLogger
- type Level
- type Logger
- type NacosLogger
- func (l *NacosLogger) Debug(args ...interface{})
- func (l *NacosLogger) Debugf(fmt string, args ...interface{})
- func (l *NacosLogger) Error(args ...interface{})
- func (l *NacosLogger) Errorf(fmt string, args ...interface{})
- func (l *NacosLogger) Info(args ...interface{})
- func (l *NacosLogger) Infof(fmt string, args ...interface{})
- func (l *NacosLogger) Level(level string)
- func (l *NacosLogger) Log(keyvals ...interface{}) error
- func (l *NacosLogger) Warn(args ...interface{})
- func (l *NacosLogger) Warnf(fmt string, args ...interface{})
- type Option
- type RocketmqLogger
- func (w *RocketmqLogger) Debug(msg string, fields map[string]interface{})
- func (w *RocketmqLogger) Error(msg string, fields map[string]interface{})
- func (w *RocketmqLogger) Fatal(msg string, fields map[string]interface{})
- func (w *RocketmqLogger) Info(msg string, fields map[string]interface{})
- func (w *RocketmqLogger) Level(level string)
- func (w *RocketmqLogger) Log(keyvals ...interface{}) error
- func (w *RocketmqLogger) OutputPath(path string) (err error)
- func (w *RocketmqLogger) Warning(msg string, fields map[string]interface{})
- type SentinelLogger
- func (w *SentinelLogger) Debug(msg string, keysAndValues ...interface{})
- func (w *SentinelLogger) DebugEnabled() bool
- func (w *SentinelLogger) Error(err error, msg string, keysAndValues ...interface{})
- func (w *SentinelLogger) ErrorEnabled() bool
- func (w *SentinelLogger) Info(msg string, keysAndValues ...interface{})
- func (w *SentinelLogger) InfoEnabled() bool
- func (w *SentinelLogger) Log(keyvals ...interface{}) error
- func (w *SentinelLogger) Warn(msg string, keysAndValues ...interface{})
- func (w *SentinelLogger) WarnEnabled() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GRPCUnaryClientRequestLogging ¶
func GRPCUnaryClientRequestLogging() grpc.UnaryClientInterceptor
func GRPCUnaryClientTraceLog ¶
func GRPCUnaryClientTraceLog(l *Logger) grpc.UnaryClientInterceptor
ClientInterceptor grpc client wrapper
func GRPCUnaryServerRequestLogging ¶
func GRPCUnaryServerRequestLogging() grpc.UnaryServerInterceptor
func GRPCUnaryServerTraceLog ¶
func GRPCUnaryServerTraceLog(l *Logger) grpc.UnaryServerInterceptor
func HTTPServerTraceLog ¶
func HTTPServerTraceLog(l *Logger) gin.HandlerFunc
func RestyLogging ¶
func RestyLogging() func(c *resty.Client, res *resty.Response) error
func WithRestyTraceLog ¶
Types ¶
type GormLogger ¶
type GormLogger struct { Logger *Logger SlowThreshold time.Duration // contains filtered or unexported fields }
func (GormLogger) Error ¶
func (w GormLogger) Error(_ context.Context, msg string, data ...interface{})
func (GormLogger) Info ¶
func (w GormLogger) Info(_ context.Context, msg string, data ...interface{})
func (*GormLogger) Log ¶
func (w *GormLogger) Log(keyvals ...interface{}) error
type JaegerLogger ¶
type JaegerLogger struct {
Logger *Logger
}
func (*JaegerLogger) Debugf ¶
func (l *JaegerLogger) Debugf(msg string, args ...interface{})
Infof logs a message at info priority
func (*JaegerLogger) Error ¶
func (l *JaegerLogger) Error(msg string)
Error logs a message at error priority
func (*JaegerLogger) Infof ¶
func (l *JaegerLogger) Infof(msg string, args ...interface{})
Infof logs a message at info priority
func (*JaegerLogger) Log ¶
func (l *JaegerLogger) Log(keyvals ...interface{}) error
type KcronLogger ¶
type KcronLogger struct {
Logger *Logger
}
func (*KcronLogger) Error ¶
func (w *KcronLogger) Error(err error, msg string, keysAndValues ...interface{})
func (*KcronLogger) Info ¶
func (w *KcronLogger) Info(msg string, keysAndValues ...interface{})
func (*KcronLogger) Log ¶
func (w *KcronLogger) Log(keyvals ...interface{}) error
type Level ¶
type Level int8
Level defines log levels.
const ( // DebugLevel defines debug log level. DebugLevel Level = iota // InfoLevel defines info log level. InfoLevel // WarnLevel defines warn log level. WarnLevel // ErrorLevel defines error log level. ErrorLevel // FatalLevel defines fatal log level. FatalLevel // PanicLevel defines panic log level. PanicLevel // NoLevel defines an absent log level. NoLevel // Disabled disables the logger. Disabled // TraceLevel defines trace log level. TraceLevel Level = -1 )
func LevelUnmarshalText ¶
LevelUnmarshalText level in config unmarshal to log.level
type Logger ¶
func DefaultLogger ¶
func DefaultLogger() *Logger
func FromTraceCtx ¶
func NewLoggerWith ¶
type NacosLogger ¶
type NacosLogger struct {
Logger *Logger
}
func (*NacosLogger) Debug ¶
func (l *NacosLogger) Debug(args ...interface{})
func (*NacosLogger) Debugf ¶
func (l *NacosLogger) Debugf(fmt string, args ...interface{})
func (*NacosLogger) Error ¶
func (l *NacosLogger) Error(args ...interface{})
func (*NacosLogger) Errorf ¶
func (l *NacosLogger) Errorf(fmt string, args ...interface{})
func (*NacosLogger) Info ¶
func (l *NacosLogger) Info(args ...interface{})
func (*NacosLogger) Infof ¶
func (l *NacosLogger) Infof(fmt string, args ...interface{})
func (*NacosLogger) Level ¶
func (l *NacosLogger) Level(level string)
func (*NacosLogger) Log ¶
func (l *NacosLogger) Log(keyvals ...interface{}) error
func (*NacosLogger) Warn ¶
func (l *NacosLogger) Warn(args ...interface{})
func (*NacosLogger) Warnf ¶
func (l *NacosLogger) Warnf(fmt string, args ...interface{})
type Option ¶
func (*Option) MergeOption ¶
type RocketmqLogger ¶
type RocketmqLogger struct {
Logger *Logger
}
func (*RocketmqLogger) Debug ¶
func (w *RocketmqLogger) Debug(msg string, fields map[string]interface{})
func (*RocketmqLogger) Error ¶
func (w *RocketmqLogger) Error(msg string, fields map[string]interface{})
func (*RocketmqLogger) Fatal ¶
func (w *RocketmqLogger) Fatal(msg string, fields map[string]interface{})
func (*RocketmqLogger) Info ¶
func (w *RocketmqLogger) Info(msg string, fields map[string]interface{})
func (*RocketmqLogger) Level ¶
func (w *RocketmqLogger) Level(level string)
func (*RocketmqLogger) Log ¶
func (w *RocketmqLogger) Log(keyvals ...interface{}) error
func (*RocketmqLogger) OutputPath ¶
func (w *RocketmqLogger) OutputPath(path string) (err error)
func (*RocketmqLogger) Warning ¶
func (w *RocketmqLogger) Warning(msg string, fields map[string]interface{})
type SentinelLogger ¶
type SentinelLogger struct {
Logger *Logger
}
func (*SentinelLogger) Debug ¶
func (w *SentinelLogger) Debug(msg string, keysAndValues ...interface{})
func (*SentinelLogger) DebugEnabled ¶
func (w *SentinelLogger) DebugEnabled() bool
func (*SentinelLogger) Error ¶
func (w *SentinelLogger) Error(err error, msg string, keysAndValues ...interface{})
func (*SentinelLogger) ErrorEnabled ¶
func (w *SentinelLogger) ErrorEnabled() bool
func (*SentinelLogger) Info ¶
func (w *SentinelLogger) Info(msg string, keysAndValues ...interface{})
func (*SentinelLogger) InfoEnabled ¶
func (w *SentinelLogger) InfoEnabled() bool
func (*SentinelLogger) Log ¶
func (w *SentinelLogger) Log(keyvals ...interface{}) error
func (*SentinelLogger) Warn ¶
func (w *SentinelLogger) Warn(msg string, keysAndValues ...interface{})
func (*SentinelLogger) WarnEnabled ¶
func (w *SentinelLogger) WarnEnabled() bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.