Documentation
¶
Index ¶
- Constants
- func Config(conf any) slog.Attr
- func Err(err error) slog.Attr
- func FromContext(ctx context.Context) *slog.Logger
- func HealthStatus(status fmt.Stringer) slog.Attr
- func IntoContext(ctx context.Context, logger *slog.Logger) context.Context
- func Panic(val any) slog.Attr
- func RPCMethod(method string) slog.Attr
- func RPCService(service string) slog.Attr
- func RPCSystem(system string) slog.Attr
- func ResourceID(id fmt.Stringer) slog.Attr
- func ResourceName(name string) slog.Attr
- func Sampled(span trace.Span) slog.Attr
- func SpanID(span trace.Span) slog.Attr
- func Stacktrace() slog.Attr
- func Subject(subject string) slog.Attr
- func TraceID(span trace.Span) slog.Attr
Constants ¶
View Source
const ( ConfigKey = "config" ErrorKey = "error" HealthStatusKey = "health_status" PanicKey = "panic" StacktraceKey = "stacktrace" TraceIDKey = "trace_id" SpanIDKey = "span_id" SampledKey = "sampled" SubjectKey = "subject" RPCSystemKey = "rpc_system" RPCServiceKey = "rpc_service" RPCMethodKey = "rpc_method" ResourceIDKey = "resource_id" ResourceNameKey = "resource_name" )
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶ added in v0.0.90
FromContext returns the logger from the context, or the default logger if none exists.
func IntoContext ¶ added in v0.0.114
IntoContext adds the given logger to the context, returning the new context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.