log

package
v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

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

FromContext gets the logger from the context If the logger is not found in the context, a new logger is created and set to the context

func NewLogger

func NewLogger() *slog.Logger

NewLogger creates a new logger with the default settings The logger is configured to log to stdout in JSON format The log level is set to the value of the ZERO_LOG_LEVEL environment variable If the ZERO_LOG_LEVEL environment variable is not set, the log level is set to INFO

func SetLoggerToContext

func SetLoggerToContext(ctx context.Context, logger *slog.Logger) context.Context

SetLoggerToContext sets the logger to the context

Types

This section is empty.

Jump to

Keyboard shortcuts

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