logger

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields Fields)

Debug logs a message at level Debug with fields.

func Debugf

func Debugf(format string, args ...interface{})

Debugf logs a message at level Debug on the standard logger.

func Error

func Error(msg string, fields Fields)

Error logs a message at level Error with fields.

func Errorf

func Errorf(format string, args ...interface{})

Errorf logs a message at level Error on the standard logger.

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf logs a message at level Fatal on the standard logger and exits.

func GetLogger

func GetLogger() *slog.Logger

GetLogger returns the underlying slog.Logger instance

func Info

func Info(msg string, fields Fields)

Info logs a message at level Info with fields.

func Infof

func Infof(format string, args ...interface{})

Infof logs a message at level Info on the standard logger.

func SetLogLevel

func SetLogLevel(level slog.Level)

SetLogLevel sets the log level for the logger

func Warn

func Warn(msg string, fields Fields)

Warn logs a message at level Warn with fields.

func Warnf

func Warnf(format string, args ...interface{})

Warnf logs a message at level Warn on the standard logger.

Types

type Fields

type Fields map[string]interface{}

Fields is a map of key-value pairs for structured logging

Jump to

Keyboard shortcuts

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