v2.16.0: Log filtering and a settings-preserving config write
A focused release: pitchfork logs gains first-class filtering, a nasty config-write bug that silently wiped [settings.*] entries is fixed, and the web log viewer no longer eats the first token of daemon output.
Added
-
Log filtering with
--grep,--regex, and--case-sensitive(#532) — @gaojunran.pitchfork logscan now filter messages at the SQLite layer, so history and--tailboth respect the filter without extra pipes:pitchfork logs api --grep error --grep warn # OR across substrings pitchfork logs api --regex '5\d{2}' --tail # regex, live tail pitchfork logs api --grep Login --case-sensitive
Multiple
--grepvalues are combined with OR. Regex patterns are validated up front so you get a clear CLI error instead of a mid-query SQLite failure. Behind the scenes, aregexpscalar function is registered per connection with an LRU cache so repeated patterns don't recompile per row, and the supervisor now batches log inserts (100 lines / 100 ms) via a newappend_batchpath — with a synchronous flush right before ready-pattern signalling and process exit, so startup-log capture and trailing lines both stay accurate.
Fixed
-
Config writes preserve existing
[settings.*]entries (#575, fixes #574) — @gaojunran.write_unlocked()was constructing the on-disk config without copyingself.settings, so any read-modify-write cycle silently dropped existing settings. That brokesettings set(the new value was discarded) andproxy add/register_namespace/remove_slug(which wiped previously configured settings as a side effect). Settings are now round-tripped through writes, with anis_empty()guard so empty configs don't emit a bare[settings]header. -
Web log viewer no longer drops the first message token or leaks timestamps (#581) — @gaojunran. The web UI's
LOG_PREFIX_REwas modeled on pitchfork's internal<ts> <level> <msg>format and, when applied to arbitrary daemon stdout, silently ate the daemon's first content token (often its own log level) and failed to strip prefixes from indented or blank continuation lines — which caused pitchfork's prepended timestamp to leak into the rendered content. The parser now strips only the fixed<ts>prefix added by the web log API and keeps the message verbatim. -
teraupgraded to v2 (#571). The template renderer now registers a compatibilitydefaultfilter matching v1 semantics (supportsvalue=andboolean=) so existingpitchfork.tomltemplates keep working. -
ARM64 Linux release binaries run on older glibc hosts again (#580) — @brandon-julio-t. The
aarch64-unknown-linux-gnurelease build is now pinned tocross-rs0.2.5 instead of the mutable:maintag, so the resulting binary targets glibc 2.18 and runs on hosts like Amazon Linux 2023 (glibc 2.34). v2.15.0 had silently picked up aGLIBC_2.39requirement from the newer image.
Changed
-
Faster supervisor startup and liveness checks (#576, fixes #439) — @gaojunran.
Procs::new()no longer callsSystem::new_all()/refresh_processes(), which used to scan every process on the system (~500 ms) on first access — including something as trivial aspitchfork cdchecking whether the supervisor is alive.is_running()now useskill(pid, 0)on Unix for an O(1) liveness check independent of the process cache, and seven caller-side refresh calls that existed only to feed the old check have been removed. -
Consistent, correct IEC byte formatting (#582) — @lthiery. Four hand-rolled formatters in
procs.rsandtui/ui.rsdivided by 1024 but labeled results as KB/MB/GB. They now usehumanbyte0.4 with matching IEC units (KiB/MiB/GiBin CLI output, compactK/M/Gin the TUI), values above GiB roll over to TiB/PiB instead of rendering as e.g.1100.0GB, and per-magnitude precision is preserved. The published JSON schema formemory_limitnow advertises["string", "integer"], matching the deserializer, which already accepted raw byte counts likememory_limit = 52428800.
New Contributors
- @brandon-julio-t made their first contribution in #580
- @lthiery made their first contribution in #582
Full Changelog: v2.15.0...v2.16.0
💚 Sponsor pitchfork
pitchfork is maintained by @jdx, an open source developer for entire.io, the title sponsor of the jdx.dev open source tools including mise, aube, hk, and more. Development is sustained by sponsorships.
If pitchfork has a place in your dev workflow, please consider sponsoring at jdx.dev. Individual and company sponsorships are what keep the project healthy and moving forward.