slogger

package module
v0.0.0-...-1983f6d Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 8 Imported by: 0

README

go-simple-slogger

A very simple wrapper for logging in Go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDir

func WithDir(dir string) optionFunc

func WithFile

func WithFile(file string) optionFunc

func WithMaxAge

func WithMaxAge(maxAge int) optionFunc

func WithMaxBackups

func WithMaxBackups(maxBackups int) optionFunc

func WithMaxSize

func WithMaxSize(maxSize int) optionFunc

Types

type Slogger

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

func NewAsyncSlogger

func NewAsyncSlogger(opts ...optionFunc) *Slogger

func NewSlogger

func NewSlogger(opts ...optionFunc) *Slogger

func (*Slogger) Debug

func (l *Slogger) Debug(msg string, attrs ...slog.Attr)

func (*Slogger) Error

func (l *Slogger) Error(msg string, attrs ...slog.Attr)

func (*Slogger) Info

func (l *Slogger) Info(msg string, attrs ...slog.Attr)

func (*Slogger) Warn

func (l *Slogger) Warn(msg string, attrs ...slog.Attr)

Jump to

Keyboard shortcuts

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