banger/internal/daemon
Thales Maciel 644e60d739
Add structured daemon lifecycle logs
VM start, image build, and network/setup failures were hard to diagnose because bangerd emitted almost no lifecycle logs and the Firecracker SDK logger was discarded. This adds a daemon-wide JSON logger with configurable log level so failures leave breadcrumbs instead of only side effects.

Log the main daemon and VM lifecycle stages, preserve raw Firecracker and image-build helper output in dedicated files, and include those log paths in daemon status and returned errors. Bridge SDK logrus output into the daemon logger at debug level so low-level Firecracker diagnostics are available without making normal info logs unreadable.

Validation: go test ./... and make build. Left unrelated worktree changes out of this commit, including internal/api/types.go, the deleted shell scripts, and my-rootfs.ext4.
2026-03-16 16:16:28 -03:00
..
daemon.go Add structured daemon lifecycle logs 2026-03-16 16:16:28 -03:00
daemon_test.go Make runtime defaults portable 2026-03-16 15:30:08 -03:00
images.go Add structured daemon lifecycle logs 2026-03-16 16:16:28 -03:00
logger.go Add structured daemon lifecycle logs 2026-03-16 16:16:28 -03:00
logger_test.go Add structured daemon lifecycle logs 2026-03-16 16:16:28 -03:00
nat.go Make runtime defaults portable 2026-03-16 15:30:08 -03:00
nat_test.go Manage NAT directly from VM records 2026-03-16 13:50:54 -03:00
preflight.go Make runtime defaults portable 2026-03-16 15:30:08 -03:00
snapshot.go Rollback partial dm snapshot startup 2026-03-16 14:06:17 -03:00
snapshot_test.go Rollback partial dm snapshot startup 2026-03-16 14:06:17 -03:00
vm.go Add structured daemon lifecycle logs 2026-03-16 16:16:28 -03:00
vm_test.go Add regression coverage for VM failure paths 2026-03-16 15:46:54 -03:00