Change 32818

tom_tyler (C. Thomas Tyler)
C. Thomas Tyler committed this change into //p4lf/dev
Request Review
Download .zip
Initial implementation of p4lf in Go.

Adds:
- Go module (github.com/rcowham/p4lf) with fsnotify dependency
- internal/config: KEY=VALUE config parser with all settings
- internal/tailer: file reader with inode-based rotation detection and
  state file checkpoint/resume (inode + byte offset, JSON, atomic write)
- internal/chunker: gzip chunk writer with MaxLogChunks/MinLogSpace guards
- internal/logger: rotating log writer with gzip of rotated files
- cmd/p4lf/main.go: service main loop, SIGHUP/SIGTERM/SIGINT handling,
  config hot-reload on modtime change
- Makefile: build/test/install/release targets for Linux amd64/arm64,
  macOS arm64/amd64; version injected via ldflags
- p4lf.cfg.example: fully documented example config
- p4lf.service: systemd unit file (User=perforce, Restart=on-failure)
- ai/session_log_2026-06-25.md: design session log
- ai/session_log_2026-06-25-2.md: implementation session log
- .p4ignore: added bin/ and dist/
  • Files 15
  • Comments 0
1 edited 14 added 0 deleted
.p4ignore#3
Loading...
Makefile#1
Loading...
ai/session_log_2026-06-25-2.md#1
Loading...
ai/session_log_2026-06-25.md#1
Loading...
cmd/p4lf/main.go#1
Loading...
go.mod#1
Loading...
go.sum#1
Loading...
internal/chunker/chunker.go#1
Loading...
internal/chunker/chunker_test.go#1
Loading...
internal/config/config.go#1
Loading...
internal/config/config_test.go#1
Loading...
internal/logger/logger.go#1
Loading...
internal/tailer/tailer.go#1
Loading...
p4lf.cfg.example#1
Loading...
p4lf.service#1
Loading...
Tip: Use n and p to cycle through the changes.