logging

package
v0.2.8-rc10 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: AGPL-3.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package logging wires third-party loggers into the agent's slog handler so that every log line the agent emits shares one destination and format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseHandler

func BaseHandler() slog.Handler

BaseHandler returns the handler set with SetBaseHandler, or nil

func BridgeContainerd

func BridgeContainerd(level slog.Level)

BridgeContainerd routes containerd's logrus based output into the default slog logger at the given level. It must be called after slog.SetDefault, and is a no-op on subsequent calls.

func NewLevelHandler

func NewLevelHandler(level slog.Leveler, handler slog.Handler) slog.Handler

NewLevelHandler returns a handler that drops records below level before passing them to handler

func ResolveLevel

func ResolveLevel(configured string) (level slog.Level, name string, ok bool)

func SetBaseHandler

func SetBaseHandler(h slog.Handler)

SetBaseHandler makes the agent log through h instead of its own stdout handler. It is meant for embedders that route logs into the host application logger. Passing nil restores the default stdout handler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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