Log binary version and executable path on startup

This commit is contained in:
Mikhail Chusavitin
2026-02-04 10:21:18 +03:00
parent 7c606af2bb
commit e2800b06f9

View File

@@ -53,6 +53,9 @@ func main() {
os.Exit(0) os.Exit(0)
} }
exePath, _ := os.Executable()
slog.Info("starting qfs", "version", Version, "executable", exePath)
resolvedLocalDBPath, err := appstate.ResolveDBPath(*localDBPath) resolvedLocalDBPath, err := appstate.ResolveDBPath(*localDBPath)
if err != nil { if err != nil {
slog.Error("failed to resolve local database path", "error", err) slog.Error("failed to resolve local database path", "error", err)
@@ -125,6 +128,7 @@ func main() {
} }
slog.Info("starting QuoteForge server", slog.Info("starting QuoteForge server",
"version", Version,
"host", cfg.Server.Host, "host", cfg.Server.Host,
"port", cfg.Server.Port, "port", cfg.Server.Port,
"db_user", dbUser, "db_user", dbUser,
@@ -288,7 +292,7 @@ func runSetupMode(local *localdb.LocalDB) {
}) })
addr := "127.0.0.1:8080" addr := "127.0.0.1:8080"
slog.Info("starting setup mode server", "address", addr) slog.Info("starting setup mode server", "address", addr, "version", Version)
srv := &http.Server{ srv := &http.Server{
Addr: addr, Addr: addr,