Documentation ¶
Index ¶
- func OtelSeverityText(lv logrus.Level) string
- 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
- type Writer
- func (w *Writer) CtxDebugf(ctx context.Context, format string, v ...interface{})
- func (w *Writer) CtxErrorf(ctx context.Context, format string, v ...interface{})
- func (w *Writer) CtxFatalf(ctx context.Context, format string, v ...interface{})
- func (w *Writer) CtxInfof(ctx context.Context, format string, v ...interface{})
- func (w *Writer) CtxNoticef(ctx context.Context, format string, v ...interface{})
- func (w *Writer) CtxTracef(ctx context.Context, format string, v ...interface{})
- func (w *Writer) CtxWarnf(ctx context.Context, format string, v ...interface{})
- func (w *Writer) Debug(v ...interface{})
- func (w *Writer) Debugf(format string, v ...interface{})
- func (w *Writer) Error(v ...interface{})
- func (w *Writer) Errorf(format string, v ...interface{})
- func (w *Writer) Fatal(v ...interface{})
- func (w *Writer) Fatalf(format string, v ...interface{})
- func (w *Writer) Info(v ...interface{})
- func (w *Writer) Infof(format string, v ...interface{})
- func (w *Writer) Logger() *logrus.Logger
- func (w *Writer) Notice(v ...interface{})
- func (w *Writer) Noticef(format string, v ...interface{})
- func (w *Writer) Printf(format string, v ...interface{})
- func (w *Writer) SetOutput(writer io.Writer)
- func (w *Writer) Trace(v ...interface{})
- func (w *Writer) Tracef(format string, v ...interface{})
- func (w *Writer) Warn(v ...interface{})
- func (w *Writer) Warnf(format string, v ...interface{})
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 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.