😩 a dead simple logging interface for go
Find a file
2024-11-20 16:57:24 -06:00
go.mod add some color 2024-11-20 16:57:24 -06:00
go.sum add some color 2024-11-20 16:57:24 -06:00
readme.md add some color 2024-11-20 16:57:24 -06:00
slog.go add some color 2024-11-20 16:57:24 -06:00
slog_test.go add test 2024-11-20 16:34:25 -06:00

slog 😩

a dead simple logging interface for go.

// printf
slog.Info("opened port %d", 3000)

// printf only when some flag is true
slog.Debug(config.Verbose, "chugging away doing %s...", xyz)

// printf on err and continue
slog.Warn(err, "something failed but it's ok")

// printf on err and exit
slog.Die(err, "uh oh!")

all functions accept printf-like arguments