logger

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) *slog.Logger

FromContext extracts the logger from context. Falls back to slog.Default() if not set.

func Init

func Init()

Init configures the default slog logger with JSON output to stdout.

func NewContext

func NewContext(ctx context.Context, requestID, toolName, username string) context.Context

NewContext returns a new context with a logger that includes request_id, tool_name, and username.

Types

This section is empty.

Jump to

Keyboard shortcuts

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