logger

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CorrelationIDKey = "correlation_id"
	ServerTypeKey    = "server_type"
)

Variables

View Source
var (
	CorrelationIDContextKey = contextKey(CorrelationIDKey)
	ServerTypeContextKey    = contextKey(ServerTypeKey)
)

Functions

func CorrelationID added in v3.1.0

func CorrelationID(ctx context.Context) string

func CorrelationIDAttr added in v3.1.0

func CorrelationIDAttr(ctx context.Context) slog.Attr

func GenerateCorrelationID

func GenerateCorrelationID() slog.Attr

func LogLevel added in v3.1.0

func LogLevel(level string) slog.Level

func New

func New(logPath, level string) *slog.Logger

func ServerType added in v3.2.0

func ServerType(ctx context.Context) string

func ServerTypeAttr added in v3.2.0

func ServerTypeAttr(ctx context.Context) slog.Attr

Types

This section is empty.

Jump to

Keyboard shortcuts

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