Documentation ¶
Index ¶
- func OtelSeverityText(lv logrus.Level) string
- type Logger
- 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 = hertzlogrus.Logger
Logger an alias to github.com/stonebirdjx/logger/logrus Logger
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option logrus hook option
func WithRecordStackTraceInSpan ¶
WithRecordStackTraceInSpan configures whether record stack trace in span
func WithTraceHookConfig ¶
func WithTraceHookConfig(hookConfig *TraceHookConfig) Option
WithTraceHookConfig configures trace hook config
func WithTraceHookErrorSpanLevel ¶
WithTraceHookErrorSpanLevel configures trace hook error span level
func WithTraceHookLevels ¶
WithTraceHookLevels configures hook levels
type TraceHook ¶
type TraceHook struct {
// contains filtered or unexported fields
}
TraceHook trace hook
func NewTraceHook ¶
func NewTraceHook(cfg *TraceHookConfig) *TraceHook
NewTraceHook create trace hook
type TraceHookConfig ¶
type TraceHookConfig struct {
// contains filtered or unexported fields
}
TraceHookConfig trace hook config
Click to show internal directories.
Click to hide internal directories.