No description
  • Go 93.9%
  • Just 6.1%
Find a file
phsk69 e8d8e8b1a4
All checks were successful
ci / build-and-test (push) Successful in 3s
release / release (push) Successful in 15s
Merge branch 'release/v0.2.0'
2026-03-09 20:02:32 +01:00
.forgejo/workflows Dirty dirty 2026-03-09 19:58:44 +01:00
cmd/litty feat: add litty CLI tool — go commands but make them gen alpha 🔥 2026-03-04 21:04:58 +01:00
examples feat: add JSONHandler + litty CI vibes — structured logs that eat no cap 🔥 2026-03-08 18:51:53 +01:00
.gitignore feat: add litty CLI tool — go commands but make them gen alpha 🔥 2026-03-04 21:04:58 +01:00
category.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
category_test.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
CHANGELOG.md release: v0.2.0 — CLI + JSON handler, absolute unit of a drop 🔥 2026-03-09 20:02:12 +01:00
CLAUDE.md feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
doc.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
format.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
format_test.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
go.mod feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
handler.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
handler_test.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
json_handler.go feat: add JSONHandler + litty CI vibes — structured logs that eat no cap 🔥 2026-03-08 18:51:53 +01:00
json_handler_test.go feat: add JSONHandler + litty CI vibes — structured logs that eat no cap 🔥 2026-03-08 18:51:53 +01:00
justfile feat: add JSONHandler + litty CI vibes — structured logs that eat no cap 🔥 2026-03-08 18:51:53 +01:00
level.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
level_test.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
LICENSE feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
options.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
options_test.go feat: litty-logs-go v0.1 genesis drop — the most bussin Go logging library no cap 🔥 2026-03-02 21:14:00 +01:00
README.md feat: add JSONHandler + litty CI vibes — structured logs that eat no cap 🔥 2026-03-08 18:51:53 +01:00
VERSION release: v0.2.0 — CLI + JSON handler, absolute unit of a drop 🔥 2026-03-09 20:02:12 +01:00

litty-logs-go 🔥

the most bussin Go logging library no cap. transforms your boring slog output into gen alpha energy with emojis, ANSI colors, and abbreviated categories fr fr

before vs after 💀➡️🔥

before (boring corporate slog):

2026/03/02 21:45:00 INFO request received method=GET path=/api/vibes

after (litty-logs):

[🔥 info] [2026-03-02T21:45:00.420Z] [app] request received method=GET path=/api/vibes

install 📦

go get github.com/phsk69/litty-logs-go

usage 🔥

one-liner setup — bussin out the box

package main

import "github.com/phsk69/litty-logs-go"

func main() {
    logger := litty.NewLogger()
    logger.Info("we vibing fr fr", "key", "value")
}

override only what you want — defaults stay bussin 💅

// just turn off colors — UTC, shortening, everything else stays fire
logger := litty.NewLogger(litty.WithColors(false))

// stack em like a combo meal bestie
logger := litty.NewLogger(
    litty.WithColors(false),
    litty.WithTimestampFirst(true),
    litty.WithLevel(slog.LevelDebug),
)

categorized loggers via WithGroup 📦

logger := litty.NewLogger()
serviceLogger := logger.WithGroup("MyService")
serviceLogger.Info("service is cooking bestie")
// output: [🔥 info] [2026-03-02T21:45:00.420Z] [MyService] service is cooking bestie

set as default slog logger 🌍

slog.SetDefault(litty.NewLogger())
slog.Info("the whole app is litty now bestie")

timestamp-first mode for observability besties 📊

logger := litty.NewLogger(litty.WithTimestampFirst(true))
// output: [2026-03-02T21:45:00.420Z] [🔥 info] [app] timestamp comes first bestie

full struct control for power users 👑

opts := litty.DefaultOptions()
opts.UseColors = false
opts.TimestampFirst = true
logger := slog.New(litty.NewHandlerWithOptions(opts))

JSON structured output 🔥

need structured logs for log aggregators (Loki, Grafana, etc)? litty-json outputs one compact JSON object per line with literal emojis. machines can parse it AND it still looks fire in a terminal no cap

logger := litty.NewJSONLogger()
logger.Info("request received", "method", "GET", "path", "/api/vibes")

output:

{"timestamp":"2026-03-02T21:45:00.420Z","level":"info","emoji":"🔥","category":"app","message":"request received","method":"GET","path":"/api/vibes"}

same With*() options as the text handler. same WithGroup() and WithAttrs(). just swap NewLogger for NewJSONLogger bestie 💅

// categorized JSON logs
logger := litty.NewJSONLogger()
serviceLogger := logger.WithGroup("PaymentService")
serviceLogger.Info("payment processed", "amount", 42.69)

// pre-resolved attrs on every log
requestLogger := logger.With("requestId", "abc-123")
requestLogger.Info("request processed", "duration", "420ms")

CLI tool 🔥

litty also comes as a CLI tool that wraps Go commands with gen alpha output. install it and never look at boring go test output again bestie

install

go install github.com/phsk69/litty-logs-go/cmd/litty@latest

usage

litty test ./...              # go test but bussin 🧪
litty test -run TestFoo       # run specific test 🎯
litty build ./cmd/myapp       # go build but litty 🏗️
litty run ./cmd/myapp         # go run with litty compile errors 🏃
litty vet ./...               # go vet with gen alpha vibes 🔍
litty clean                   # see whats getting yeeted 🗑️

all args after the command get passed straight to the go tool. auto-injects -v for test and -x for clean so theres always output to rewrite 💅

before vs after 💀➡️🔥

before (boring go test):

=== RUN   TestFoo
--- PASS: TestFoo (0.00s)
=== RUN   TestBar
--- FAIL: TestBar (0.01s)
    bar_test.go:15: expected 5, got 3
FAIL

after (litty test):

🔥 litty test — lets cook bestie
🏃 running TestFoo...
✅ TestFoo absolutely slayed (0.00s) 🔥
🏃 running TestBar...
💀 TestBar took a fat L (0.01s)
    ↳ bar_test.go:15: expected 5, got 3
💀 tests took a massive L, not bussin at all

log levels 🎯

level emoji label color vibe
trace 👀 trace cyan for when you lowkey wanna see everything
debug 🔍 debug blue investigating whats going on under the hood
info 🔥 info green everything is bussin and vibing
warn 😤 warn yellow something kinda sus but we not panicking
error 💀 err red something took a fat L

options 🎛️

option type default what it does
Level slog.Leveler slog.LevelInfo minimum log level — anything below gets yeeted 🗑️
UseColors bool true ANSI color codes for terminal vibrancy 🎨
ShortenCategories bool true yeets namespace bloat from category names
TimestampFirst bool false put timestamp before level (observability style)
UseUtcTimestamp bool true UTC timestamps for international rizz 🌍
Writer io.Writer os.Stderr where the output goes bestie

development 🛠️

# build
just build

# test with race detector
just test

# lint
just vet

# run the example
just example

# bump version
just bump patch    # 0.1.0 -> 0.1.1
just bump minor    # 0.1.0 -> 0.2.0
just bump major    # 0.1.0 -> 1.0.0

# gitflow release
just release patch

roadmap 🗺️

  • CLI tool (go install litty command for litty-fied builds/tests)
  • JSON structured output (litty-json)
  • file sink with rotation and compression
  • message rewriting (Go framework messages → gen alpha slang)
  • webhook sinks (Matrix, Teams)

license 📄

MIT — do whatever you want bestie, just keep the vibes going 💅