Documentation
¶
Overview ¶
Package logging provides slog helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
Logger represents a new slog logger.
func DefaultLogger ¶
DefaultLogger returns a logger with slog default handler.
func DiscardLogger ¶ added in v0.1.1
func DiscardLogger() *Logger
DiscardLogger returns a logger with slog.DiscardHandler.
func JSONLogger ¶
JSONLogger returns a logger with a slog.JSONHandler.
func StandardLogger ¶ added in v0.2.3
func StandardLogger() *Logger
StandardLogger returns a logger with standard options set.
func TextLogger ¶
TextLogger returns a logger with a slog.TextHandler.
type Option ¶
type Option func(*Logger)
Option function.
func TimeFormat ¶
TimeFormat set the timeFormat Option. has no impact on DefaultLogger.
func TruncateSource ¶
func TruncateSource() Option
TruncateSource sets the includeSource and trucateSource options.
Click to show internal directories.
Click to hide internal directories.