logging

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

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

FromContext returns the logger attached to ctx, or a discard logger.

func WithLogger

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

WithLogger returns a context carrying logger. A nil logger leaves ctx unchanged.

func WithWriter

func WithWriter(ctx context.Context, w io.Writer) context.Context

WithWriter attaches w to ctx for raw subprocess output streaming. Internal functions that run subprocesses (e.g. resize2fs, e2fsck) write their stdout/stderr to this writer when present, enabling web terminal streaming.

func WriterFromCtx

func WriterFromCtx(ctx context.Context) io.Writer

WriterFromCtx returns the io.Writer attached to ctx, or nil if none was set.

Types

This section is empty.

Jump to

Keyboard shortcuts

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