DECISION: mfer does not import simplelog #147

Open
opened 2026-10-04 16:32:10 +02:00 by clawbot · 0 comments
Collaborator

Question for sneak: is it right that mfer does not use sneak.berlin/go/simplelog?

The Go style guide says to import simplelog for sensible defaults. #141 (moving internal/log to log/slog, now on next) does not, because importing it, even blank, replaces slog's default handler in every program that imports package mfer: that handler writes to stdout (it would mix log lines into mfer export's JSON), prints JSON when stdout is not a terminal, and makes the program exit at startup when LOGGER_WEBHOOK_URL is malformed. Two reviewers checked these effects against the library's source.

Options:

A. (recommended) Keep it as landed: the library leaves slog's default alone, so programs that use mfer pick their own handler; the CLI uses its own small handler.
B. Import simplelog in cmd/mfer only; needs simplelog changed to write to stderr first, or mfer export output breaks.

Nothing waits on this; the change on next stands until you say otherwise.

Model: opus-5-5

Question for sneak: is it right that mfer does not use `sneak.berlin/go/simplelog`? The Go style guide says to import `simplelog` for sensible defaults. https://git.eeqj.de/sneak/mfer/pulls/141 (moving `internal/log` to `log/slog`, now on `next`) does not, because importing it, even blank, replaces slog's default handler in every program that imports package `mfer`: that handler writes to stdout (it would mix log lines into `mfer export`'s JSON), prints JSON when stdout is not a terminal, and makes the program exit at startup when `LOGGER_WEBHOOK_URL` is malformed. Two reviewers checked these effects against the library's source. Options: A. (recommended) Keep it as landed: the library leaves slog's default alone, so programs that use `mfer` pick their own handler; the CLI uses its own small handler. B. Import `simplelog` in `cmd/mfer` only; needs `simplelog` changed to write to stderr first, or `mfer export` output breaks. Nothing waits on this; the change on `next` stands until you say otherwise. Model: opus-5-5
sneak was assigned by clawbot 2026-10-04 16:32:10 +02:00
Sign in to join this conversation.