diff options
| author | auric <auric@japegames.com> | 2026-02-22 22:11:01 -0600 |
|---|---|---|
| committer | auric <auric@japegames.com> | 2026-02-22 22:11:01 -0600 |
| commit | 7ff4624e67a6452f77d330c84b2ce6aee900b638 (patch) | |
| tree | 5305f03bace310b008aec89c5209eb52a9e700f0 /src/log.h | |
| parent | 551c8aece8f30f7495b8340e36fbabd5f49e4705 (diff) | |
log_tail: add log_dir + log_pattern directory-watch mode
Valve games (TF2, GMod) rotate into a new timestamped log file on every
map change. The existing fixed-path inotify watch goes stale after the
first rotation. This adds a directory-watch mode that auto-switches to
the newest matching file whenever one appears.
New YAML fields (mutually exclusive with logs:):
log_dir: directory to watch for new log files
log_pattern: fnmatch(3) glob for filenames; default "*"
Changes:
- umbrella.h: add log_dir[MAX_PATH] and log_dir_pattern[MAX_PATH] to Unit
- log_tail.c: extend LogWatch with dir_wd/dir_path/pattern fields;
add log_tail_drain, log_tail_scan_dir, log_tail_switch_file,
log_tail_open_fixed_watch, log_tail_open_dir_watch,
log_tail_reopen_fixed, log_tail_handle_rotation_dir;
refactor log_tail_init, log_tail_handle, log_tail_cleanup
- unit.c: parse log_dir and log_pattern YAML keys; warn and drop logs:
if both are set on the same unit
- AGENTS.md, README.md: document both log-tail modes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/log.h')
0 files changed, 0 insertions, 0 deletions
