xslog

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package xslog provides extensions to the standard structured logging module of the Go standard library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogEvent added in v0.8.0

func LogEvent(ctx context.Context, logger *slog.Logger, level slog.Level, msg string, attrs ...slog.Attr)

LogEvent is a wrapper around slog.Logger.LogAttrs that only logs if logger isn't nil. It exists primarily to reduce the amount of ifs in the code.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL