package
Version:
v1.5.0
Opens a new window with list of versions in this module.
Published: Jan 21, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package logging provides structured logging for pdf-cli.
Debug logs at debug level.
Error logs at error level.
Init initializes the global logger with the given level and format.
Reset resets the global logger (for testing).
Format represents a log format.
const (
FormatText Format = "text"
FormatJSON Format = "json"
)
ParseFormat parses a log format string.
Level represents a log level.
const (
LevelDebug Level = "debug"
LevelInfo Level = "info"
LevelWarn Level = "warn"
LevelError Level = "error"
LevelSilent Level = "silent"
)
ParseLevel parses a log level string.
ToSlogLevel converts Level to slog.Level.
Logger wraps slog for pdf-cli logging.
Get returns the global logger, initializing with defaults if needed.
New creates a new logger with the given level, format, and output.
With returns a logger with additional attributes.
Format returns the logger's format.
Level returns the logger's level.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.