Discover Packages
github.com/lgbarn/pdf-cli
internal
logging
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 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.
Opens a new window with list of known importers.
Documentation
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.