logging

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: AGPL-3.0 Imports: 4 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

Overview

Package logging bridges log/slog to the hclog logger SPIRE hands to its plugins, so that the openstack_iid plugins, and the issuer code they reuse, log into SPIRE's own log rather than to the plugin process's stderr.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is a slog.Handler writing to an hclog.Logger. Attributes in groups are flattened into dotted keys (e.g. "req.instance_id").

func NewHandler

func NewHandler(logger hclog.Logger) *Handler

NewHandler returns a Handler writing to logger.

func (*Handler) Enabled

func (h *Handler) Enabled(_ context.Context, level slog.Level) bool

Enabled reports whether the hclog logger emits records at level.

func (*Handler) Handle

func (h *Handler) Handle(_ context.Context, r slog.Record) error

Handle writes the record with its attributes.

func (*Handler) WithAttrs

func (h *Handler) WithAttrs(attrs []slog.Attr) slog.Handler

WithAttrs returns a Handler adding attrs to every record.

func (*Handler) WithGroup

func (h *Handler) WithGroup(name string) slog.Handler

WithGroup returns a Handler qualifying the keys of later attributes with name.

Jump to

Keyboard shortcuts

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