Documentation
¶
Overview ¶
Package logging is where this module's logging is wired: the sink every package reports through, and the handler the CLI installs into it.
Nothing takes a logger as a parameter or holds one in a field. Most of this module is local computation — filtering, fingerprinting, parsing manifests, rendering SBOMs — with no client to hang a logger off, so a per-instance logger would reach a fraction of it. A single sink with a global setter covers all of it in one call. Logs go to stderr so stdout stays reserved for results/SBOM/JSON output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
Configure builds the CLI's handler on stderr, installs it as both the process default and this module's sink, and returns it. Debug when verbose, Warn otherwise, so a normal run stays quiet and only surfaces warnings and errors.
func Debug ¶ added in v0.8.0
Debug and Warn are what this module's packages call. There is no Info: a library has nothing to say about its normal operation that its consumer did not already ask for — that is Debug — and nothing between "working" and "something is wrong".
func Enabled ¶ added in v0.8.0
Enabled reports whether a record at level would be written. Use it to skip building arguments nobody will read — a per-file skip reason over a large tree, for one.
Types ¶
This section is empty.