Repository navigation
tlog_lib v2.0.2
tlog_lib v2.0.2
New Features
- CLI version cross-check — warns when tlog and tlog_lib.sh versions diverge after sourcing
- Baserun advisory warnings — library warns when baserun directory is world-writable; CLI warns when running as root with default
/tmpcursor storage; non-fatal, directs to-b/--baserun - Journal flock support —
tlog_journal_read()supports optional cursor locking viaTLOG_FLOCK=1; returns exit 4 on contention - 67 new BATS tests (129 → 196 total)
Bug Fixes
- Rotation pipe fallback — when mktemp fails or decompression write fails, fall back to pipe-based decompression instead of silently dropping rotated content
- Baserun directory validation — validated before processing in
tlog_read(),tlog_journal_read(), andtlog_advance_cursors() - Arithmetic input validation —
SCAN_MAX_LINES,SCAN_TIMEOUT, andmax_linesarguments validated; non-numeric values default to 0 with stderr warning --statussubcommand — correctly display corrupt cursor state with raw content for diagnosis; add exit code note to help text--resetsubcommand — clean up orphaned journal timestamp temp files alongside cursor temp files- README — document return codes for journal read functions
Changes
- Extract rotation into
_tlog_handle_rotation()helper; decompress once to temp file - Internal code cleanup: consolidate duplicated helpers, remove CLI/library function collision, add stderr warnings on cursor write failures
- CLI
--first-runflag validates value (must beskiporfull) - CI and test infrastructure: lint gating,
bash -nin CI, dynamic version assertions, test dedup
Full Changelog
See CHANGELOG