logging

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SlogCustomAttrsCtxKey ctxKey = "slog_custom_attrs"
)

Variables

This section is empty.

Functions

func AppendCtx

func AppendCtx(parent context.Context, attr slog.Attr) context.Context

AppendCtx adds an slog attribute to the provided context so that it will be included in any Record created with such context

func Initialize

func Initialize(options datadog.IntializeOptions)

Types

type DatadogContextHandler

type DatadogContextHandler struct {
	slog.Handler
	// contains filtered or unexported fields
}

func (DatadogContextHandler) Handle

Handle adds contextual attributes to the Record before calling the underlying handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL