clog

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(key string, value bool) slog.Attr

func Debug

func Debug(ctx context.Context, msg string, err error, attrs ...slog.Attr)

Debug logs a debug message

func Error

func Error(ctx context.Context, msg string, err error, attrs ...slog.Attr)

Error logs an error message

func Float64

func Float64(key string, value float64) slog.Attr

func Info

func Info(ctx context.Context, msg string, err error, attrs ...slog.Attr)

Info logs an info message

func Int

func Int(key string, value int) slog.Attr

func Int64

func Int64(key string, value int64) slog.Attr

func String

func String(key string, value string) slog.Attr

func Uint64

func Uint64(key string, value uint64) slog.Attr

func Warn

func Warn(ctx context.Context, msg string, err error, attrs ...slog.Attr)

Warn logs a warning message

Types

type Clog

type Clog struct {
	Logger *slog.Logger
}

Clog is a custom logger that wraps the slog package

func NewClog

func NewClog() *Clog

NewClog creates a new Clog instance

Jump to

Keyboard shortcuts

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