abjshawty.dev
Anhedonia

Anhedonia

started 2026-10

wip

A TOML-configured, multi-target logging library in Rust. It does the logging so you don't have to feel anything about it.

A host program calls anhedonia::init("anhedonia.toml") once and logs normally. The TOML decides where lines go: the console, a file, an Obsidian note, a Notion database, a Google Doc. The program never knows or cares.

It's also how I'm learning Rust. The plan is eleven milestones, from a skeleton crate to a released library, and every one of them has to leave something that runs. At the halfway mark it plugs into the standard log facade and goes into a real project.

The rules were written before the code. A failing sink must not take down the program: a 502 from Notion is a logging problem, not an application problem. Logging never blocks the caller. Network sinks batch, because one HTTP round-trip per line is a design error. Secrets never live in the TOML.

Highlights

  • One init call; the TOML decides where every line goes
  • Console, file (with rotation), Obsidian, Notion and Google Docs sinks
  • Non-blocking dispatcher: logging never waits on I/O
  • A failing sink is disabled, never fatal
  • Drop-in backend for the standard log macros
  • Batching and retries for rate-limited network targets