logutil

package
v0.1.0-beta.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ErrKey = "err"

ErrKey is the slog attribute key used for errors in log messages.

Variables

This section is empty.

Functions

func DescriptorAttrs

func DescriptorAttrs(desc ocispec.Descriptor) []any

DescriptorAttrs formats a descriptor as a list of attributes.

func DescriptorGroup

func DescriptorGroup(desc ocispec.Descriptor) slog.Attr

DescriptorGroup formats an OCI descriptor for logging.

func ErrAttr

func ErrAttr(err error) slog.Attr

ErrAttr produces a slog.Attr for errors.

func OCIPlatformValue

func OCIPlatformValue(plat *ocispec.Platform) slog.Attr

OCIPlatformValue formats an OCI platform for logging.

func WithLogging

func WithLogging(logger *slog.Logger, level slog.Level, opts *oras.CopyGraphOptions) oras.CopyGraphOptions

WithLogging adds logging at level for the OnCopySkipped, PostCopy, and OnMounted functions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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