Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfiguredLevel ¶ added in v3.13.0
func ConfiguredLevel() string
ConfiguredLevel returns the level the process was configured with at startup.
func Level ¶ added in v3.13.0
func Level() string
Level returns the current process-wide effective log level name.
func ResetLevel ¶ added in v3.13.0
func ResetLevel() string
ResetLevel restores the process-wide effective level to the one configured at startup, undoing any runtime SetLevel, and returns that level's name.
Types ¶
type Option ¶
Option is the option to use to configure the logger.
func WithRuntimeLevel ¶ added in v3.13.0
WithRuntimeLevel configures the effective level through zerolog's atomic global level, so it can be changed at runtime (see SetLevel) — the Admin API's `logs level` uses this. The logger itself is built at trace, leaving the global level as the only filter. The change is process-wide and in-memory: a restart rebuilds the logger from config and reverts.
func WithWriter ¶
WithWriter is an option to configure the logging output.