Move log message about selected default compression algo after logging subsystem fully initialized

This commit is contained in:
eleksir
2026-04-04 12:44:47 +03:00
parent c3553de856
commit 14b7a17b00
2 changed files with 3 additions and 1 deletions

View File

@@ -146,7 +146,7 @@ func LoadConfig(path string) error {
switch C.DefaultCompression { switch C.DefaultCompression {
case "gzip", "pgzip", "bzip2", "xz", "lz4", "zstd": case "gzip", "pgzip", "bzip2", "xz", "lz4", "zstd":
log.Infof("Using %s as default compression algorithm", C.DefaultCompression) // No-op: compression algorithm validated.
default: default:
return fmt.Errorf("Config option default_compression must be gzip, bzip2, zstd, lz4, xz or pgzip, got %s", C.DefaultCompression) return fmt.Errorf("Config option default_compression must be gzip, bzip2, zstd, lz4, xz or pgzip, got %s", C.DefaultCompression)
} }

View File

@@ -34,6 +34,8 @@ func NewServer(configPath string) (*http.Server, error) {
log.Errorf("Failed to initialize logger: %v", err) log.Errorf("Failed to initialize logger: %v", err)
} }
log.Infof("Using %s as default compression algorithm", C.DefaultCompression)
mux := http.NewServeMux() mux := http.NewServeMux()
mux.HandleFunc(C.Location, func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc(C.Location, func(w http.ResponseWriter, r *http.Request) {