a dead simple logging interface for go
Find a file
2025-06-11 18:19:19 -05:00
go.mod Update go.mod, go.sum, readme.md, and 2 more files 2025-05-24 10:25:40 -05:00
go.sum Update go.mod, go.sum, readme.md, and 2 more files 2025-05-24 10:25:40 -05:00
readme.md change API to have separate functions for handling errors 2025-05-24 10:31:50 -05:00
slog.go _logErr() wasn't working before 2025-06-11 18:19:19 -05:00
slog_test.go Update go.mod, go.sum, readme.md, and 2 more files 2025-05-24 10:25:40 -05:00

slog 😩

a dead simple logging interface for go.

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

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

// printf and continue
slog.Warn("warnin'")

// printf and exit
slog.Die("bye")

// same as above but with error conditions
slog.WarnOn(err, "something failed but it's ok")
slog.DieOn(err, "uh oh!")

all functions accept printf-like arguments