Move log message about selected default compression algo after logging subsystem fully initialized
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user