log

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2025 License: MIT Imports: 2 Imported by: 0

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 Debug

func Debug(source Logger, msg string, args ...any)

func Error

func Error(source Logger, msg string, args ...any)

func Info

func Info(source Logger, msg string, args ...any)

func SetDefault

func SetDefault(logger *slog.Logger)

func Warn

func Warn(source Logger, msg string, args ...any)

Types

type LogSource added in v0.5.1

type LogSource interface{ Logger() *slog.Logger }

type Logger added in v0.5.1

type Logger = *slog.Logger

type LoggerLogSource added in v0.5.1

type LoggerLogSource struct{ L *slog.Logger }

func (LoggerLogSource) Logger added in v0.5.1

func (s LoggerLogSource) Logger() Logger

Jump to

Keyboard shortcuts

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