Documentation ¶
Index ¶
- func OtelSeverityText(lv logrus.Level) string
- type Logger
- func (l *Logger) CtxDebugf(ctx context.Context, format string, v ...interface{})
- func (l *Logger) CtxErrorf(ctx context.Context, format string, v ...interface{})
- func (l *Logger) CtxFatalf(ctx context.Context, format string, v ...interface{})
- func (l *Logger) CtxInfof(ctx context.Context, format string, v ...interface{})
- func (l *Logger) CtxNoticef(ctx context.Context, format string, v ...interface{})
- func (l *Logger) CtxTracef(ctx context.Context, format string, v ...interface{})
- func (l *Logger) CtxWarnf(ctx context.Context, format string, v ...interface{})
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Logger() *logrus.Logger
- func (l *Logger) Notice(v ...interface{})
- func (l *Logger) Noticef(format string, v ...interface{})
- func (l *Logger) SetLevel(level hlog.Level)
- func (l *Logger) SetOutput(writer io.Writer)
- func (l *Logger) Trace(v ...interface{})
- func (l *Logger) Tracef(format string, v ...interface{})
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
- type Option
- func WithHook(hook logrus.Hook) Option
- func WithLogger(logger *logrus.Logger) Option
- func WithRecordStackTraceInSpan(recordStackTraceInSpan bool) Option
- func WithTraceHookConfig(hookConfig *TraceHookConfig) Option
- func WithTraceHookErrorSpanLevel(level logrus.Level) Option
- func WithTraceHookLevels(levels []logrus.Level) Option
- type TraceHook
- type TraceHookConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OtelSeverityText ¶
OtelSeverityText convert logrus level to otel severityText ref to https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#severity-fields
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) CtxNoticef ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithLogger ¶
func WithTraceHookConfig ¶
func WithTraceHookConfig(hookConfig *TraceHookConfig) Option
func WithTraceHookLevels ¶
type TraceHook ¶
type TraceHook struct {
// contains filtered or unexported fields
}
func NewTraceHook ¶
func NewTraceHook(cfg *TraceHookConfig) *TraceHook
type TraceHookConfig ¶
type TraceHookConfig struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.