Documentation
¶
Overview ¶
Package logging provides a command line flag for configuring the logging output format for Go's structured logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TypeNone just discards all log output. TypeNone = &noneType{} // TypeStdout writes log output to stdout. TypeStdout = &stdoutType{} // TypeSyslog writes log output to the Unix syslog, or sends it to // a remote syslog server. TypeSyslog = &syslogType{} )
Functions ¶
This section is empty.
Types ¶
type Spec ¶
Spec is the parsed form of the --logging command line flag, consisting of the logging type, plus an optional string argument for instantiating the `slog.Handler`.
func RegisterFlag ¶
func RegisterFlag() *Spec
RegisterFlag registers the --logging flag, and returns a `Spec` that will be populated at flag parsing time.
Click to show internal directories.
Click to hide internal directories.