Documentation
¶
Overview ¶
Package log contains functions used internally for logging to a default logger implementing slog.Logger. The default logger can be set using [logger.SetDefault].
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Default ¶ added in v0.7.0
Default returns the default logger. This method is guaranteed to always return a value, even if the default has explicitly beed set to nil. If no default has been configured, or overriden by a nil value, the logger will discard all logged messages.
func ErrAttr ¶ added in v0.7.0
ErrAttr creates a log record attribute representing an error.
If the error originates from V8, the relevant JavaScript location and stack trace are included in the log record.
func SetDefault ¶
Set a default slog/Logger instance to use in contexts where a specific logger has not been set. If no default logger is set, the default will discard all log messages.
Types ¶
type LoggerLogSource ¶ added in v0.5.1
func (LoggerLogSource) Logger ¶ added in v0.5.1
func (s LoggerLogSource) Logger() Logger