log

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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