summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
authorauric <auric7@protonmail.com>2026-02-22 19:13:06 -0600
committerauric <auric7@protonmail.com>2026-02-22 19:13:06 -0600
commit55d8415e7a367efdce25ce59de91e80a3c7ffb9c (patch)
tree5edac5323122cf42b9a1ba5de83e58143b01fe4e /units
parent00f81b274958d9a8398a4213985a25be067fe7f9 (diff)
Add log_filter: pluggable per-unit output filter subprocess
Each unit can specify log_filter: <path> pointing to any executable that reads stdin and writes filtered output to stdout. The daemon spawns it once at startup (and on SIGHUP), pipes raw log data through it before ring-buffering and broadcasting to attached clients. filter.c handles spawn (fork/exec with pipes), per-chunk apply (write + poll with 250ms timeout, pass-through on silence/timeout), and stop (SIGTERM + fd cleanup). Filters are stopped and restarted cleanly on SIGHUP alongside log_tail. Bundled filters in filters/: source.py — TF2, GMod: strips server_cvar/stuck/path_goal spam, strips the L MM/DD/YYYY - HH:MM:SS: prefix minecraft.py — vanilla/Paper/Spigot: strips keepAlive, autosave, internal class logs, strips [HH:MM:SS] [thread] prefix terraria.py — vanilla/tModLoader: strips blank lines and mod loading noise during startup Any executable reading stdin/writing stdout works as a custom filter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'units')
-rw-r--r--units/tf2-novemen.yaml.example5
1 files changed, 5 insertions, 0 deletions
diff --git a/units/tf2-novemen.yaml.example b/units/tf2-novemen.yaml.example
index 22ac274..a44360a 100644
--- a/units/tf2-novemen.yaml.example
+++ b/units/tf2-novemen.yaml.example
@@ -21,5 +21,10 @@ health:
logs:
- /ded/tf/novemen/tf2/logs/service.log
+# Optional: path to any executable that reads stdin and writes to stdout.
+# Umbrella pipes raw log output through it before displaying/buffering.
+# Built-in filters live in /usr/lib/umbrella/filters/.
+log_filter: /usr/lib/umbrella/filters/source.py
+
actions:
update: /ded/tf/scripts/tf2_autoupdate.sh