summaryrefslogtreecommitdiff
path: root/src/main.c
AgeCommit message (Collapse)Author
37 hoursAdd log_filter: pluggable per-unit output filter subprocessauric
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>
38 hoursFix log tail rotation handling and SIGHUP cleanupauric
- Detect IN_MOVE_SELF/IN_DELETE_SELF events in log_tail_handle and re-open the watched path so srcds log rotation is followed correctly - Parse inotify events rather than blindly draining them - Call log_tail_cleanup() before log_tail_init() on SIGHUP to prevent fd leaks on reload Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 daysAdd Umbrella 0.1.5auric