Help us shape the future of Go! Take the 2026 Go Developer Survey

log

package
v0.1.723 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	LevelDebug   = slog.LevelDebug
	LevelInfo    = slog.LevelInfo
	LevelWarning = slog.LevelWarn
	LevelError   = slog.LevelError
	LevelFatal   = slog.Level(12)
)

Variables

Functions

func Debug

func Debug(msg string, args ...interface{})

func Error

func Error(msg string, err error)

func Fatal

func Fatal(msg string, err error)

func Info

func Info(msg string, args ...interface{})

func NewLogger

func NewLogger(level slog.Level) *slog.Logger

func NewPrettyLogger

func NewPrettyLogger(level slog.Level) *slog.Logger

func Setup

func Setup()

func Warning

func Warning(msg string, err error)

func With

func With(ctx context.Context) struct {
	Debug   func(msg string, args ...interface{})
	Info    func(msg string, args ...interface{})
	Warning func(msg string, err error)
	Error   func(msg string, err error)
	Fatal   func(msg string, err error)
}

Types

type Option

type Option func(h *prettyHandler)

func WithColor

func WithColor() Option

func WithDestinationWriter

func WithDestinationWriter(writer io.Writer) Option

func WithOutputEmptyAttrs

func WithOutputEmptyAttrs() Option

Jump to

Keyboard shortcuts

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