Documentation
¶
Overview ¶
sloginit provides an opinionated simple initialisation for the slog package.
If the output is a TTY then you'll get colourful logs, otherwise JSON. This can be overridden with the LOG_JSON=on environment variable. Log level can be overridden with the LOG_LEVEL environment variable. You can also force these options by providing relevant SlogOpt when calling Logger().
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefault ¶
func SetDefault(options ...SlogOpt)
Default will set the slog default logger to the result of passing options to Logger.
Types ¶
Click to show internal directories.
Click to hide internal directories.