logger

package
v0.0.0-...-de42637 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = Options{
	File:  "./tmp/melodeon.log",
	Level: -4,
}
View Source
var ErrOpenFile = errors.New("failed to open log file")

Functions

func Error

func Error(log *slog.Logger, msg string, err error) error

func For

func For[T any](log *slog.Logger) *slog.Logger

func New

func New(opts *Options) (*slog.Logger, error)

Types

type Options

type Options struct {
	File  string `json:"file"`
	Level int    `json:"level"`
}

Jump to

Keyboard shortcuts

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