logging

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package logging provides *slog.Logger functionality to gxpdf

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger() *slog.Logger

Logger returns the package-level logger. If no logger has been set via SetLogger, returns a discard logger that discards all output.

Logger is safe for concurrent use.

func SetLogger

func SetLogger(sl *slog.Logger)

SetLogger configures the package-level logger for debug output. Pass nil to disable logging (will use slog.DiscardHandler). Pass a configured *slog.Logger to capture debug output.

SetLogger is safe for concurrent use.

Example enabling debug output to stderr:

logging.SetLogger(slog.New(slog.NewTextHandler(os.Stderr, nil)))

Types

This section is empty.

Jump to

Keyboard shortcuts

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