feat(server): log metadata and storage backends at startup
This commit is contained in:
@@ -37,6 +37,21 @@ func main() {
|
|||||||
os.Exit(1)
|
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)
|
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
||||||
defer stop()
|
defer stop()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user