fix(service): include configured bind address in startup log

The 'listening on' message now shows both the configured address
(config.addr, e.g. ':8000') and the true effective address returned
by the listener (e.g. '0.0.0.0:8000'), making it immediately clear
which port was requested and which was actually bound:

  Go service listening on 0.0.0.0:8000 (configured: :8000, server URL: http://192.0.2.1)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tobias Gesellchen
2026-05-27 00:20:20 +02:00
co-authored by Claude Sonnet 4.6
parent 417c0223dd
commit 58a5adde5e
+2 -2
View File
@@ -526,8 +526,8 @@ func main() {
return fmt.Errorf("failed to listen on %s: %w", config.addr, err)
}
log.Printf("Go service listening on %s (server URL: %s)",
ln.Addr().String(), sanitizeLog(config.serverURL))
log.Printf("Go service listening on %s (configured: %s, server URL: %s)",
ln.Addr().String(), sanitizeLog(config.addr), sanitizeLog(config.serverURL))
// TLS cert generation can be slow on constrained hardware; run it in the
// background so the HTTP server is available immediately.