Log version on startup #86
Labels
No labels
Bug
BuildIssue
Claude-fixed
Enhancement
In Progress
Low priority
On Hold
Rejected
Security
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
keyop-go/nfq_forwarder#86
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When testing it's not always clear which version is running. We already log a startup banner - we should report the binary version there too,
Plan
There's no literal "startup banner" today - the closest thing is
getExecutableDir'sabsExeDir = '...'info line, logged early inNFQForwarderMainviaprePendPath. This ticket adds anexplicit version line right after logging is initialized (
setupLogging), atInfolevel soit's visible by default, not gated behind
--debug.The version string is already stamped at build time into
cmd/main.go'sversionvar (issue#23), threaded into
cmd/setup.NewAppfor--version- but never reachesinternal/nfq_forwarder.NFQForwarderMaintoday. Fix: add aversion stringparameter toNFQForwarderMain, passed through fromsetup.go's existing closure overversion, and lognfq_forwarder %s startingas the first line aftersetupLogging(appConfig)runs (so it goesthrough the real tint/syslog-prefix handler, not whatever slog's zero-value default is before
that point).
NFQForwarderMainisn't called from any test today (per CLAUDE.md's Testing section - it needsroot/real iptables/netlink), so this is a low-risk signature change with no existing test to
update, beyond the one real call site in
cmd/setup/setup.go.Branch:
issue86_log_version.