feat(server): log metadata and storage backends at startup

This commit is contained in:
iu
2026-10-11 10:34:30 +03:00
parent 8638d1bbfc
commit e0b4db926f
+15
View File
@@ -37,6 +37,21 @@ func main() {
os.Exit(1)
}
switch cfg.Database.Backend {
case "sqlite":
slog.Info("metadata backend", "backend", "sqlite", "path", cfg.Database.SQLitePath)
default:
slog.Info("metadata backend", "backend", "postgres",
"host", cfg.Postgres.Host, "database", cfg.Postgres.Database)
}
switch cfg.Storage.Backend {
case "fs":
slog.Info("storage backend", "backend", "fs", "root", cfg.Storage.FSRoot)
default:
slog.Info("storage backend", "backend", "s3",
"endpoint", cfg.S3.Endpoint, "bucket", cfg.S3.Bucket)
}
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer stop()