log

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 9 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger wraps a slog.Logger to provide a streamlined API and consistent behavior for the Perseus application.

func New

func New(level slog.Leveler) *Logger

New initializes and returns a new Logger using [level] to dynamically determine the active verbosity level.

func (*Logger) Debug

func (l *Logger) Debug(msg string, kvs ...any)

Debug logs a message at DEBUG level with the specified message and attributes.

func (*Logger) Error

func (l *Logger) Error(err error, msg string, kvs ...any)

Error logs a message at ERROR level with the specified message and attributes. If [err] is not nil, it will be logged in an additional attribute called "err".

func (*Logger) Info

func (l *Logger) Info(msg string, kvs ...any)

Info logs a message at INFO level with the specified message and attributes.

Jump to

Keyboard shortcuts

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