Documentation
¶
Overview ¶
Package logging provides a slog logger configured for releasegen.
Two output modes are supported:
- GitHub Actions mode (the default when GITHUB_ACTIONS=true is set): records at ERROR level are prefixed with "::error::" so they surface in the Actions UI, and the Group / EndGroup helpers emit the "::group::" / "::endgroup::" markers around per-module work.
- Local mode: a plain text handler suitable for terminal use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EndGroup ¶
EndGroup prints the matching "::endgroup::" marker. Write errors are intentionally ignored: log helpers must not fail the run.
Types ¶
type Options ¶
type Options struct {
// Writer is the destination for log records. If nil, os.Stderr is used.
Writer io.Writer
// Level is the minimum log level. Defaults to LevelInfo.
Level slog.Level
// CI, when true, formats records for GitHub Actions (::error::,
// ::group::, ::endgroup:: markers). New does not auto-detect this;
// callers should set it explicitly, typically via DetectCI().
CI bool
}
Options controls New.
Click to show internal directories.
Click to hide internal directories.