mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Initialize configs correctly, move notification config (#8367)
This PR also removes deprecated tests, adds checks to avoid races reproduced on CI/CD.
This commit is contained in:
committed by
kannappanr
parent
d2a8be6fc2
commit
6a4ef2e48e
@@ -51,6 +51,30 @@ const (
|
||||
defaultTarget = "_"
|
||||
)
|
||||
|
||||
// NewConfig - initialize new logger config.
|
||||
func NewConfig() Config {
|
||||
cfg := Config{
|
||||
// Console logging is on by default
|
||||
Console: Console{
|
||||
Enabled: true,
|
||||
},
|
||||
HTTP: make(map[string]HTTP),
|
||||
Audit: make(map[string]HTTP),
|
||||
}
|
||||
|
||||
// Create an example HTTP logger
|
||||
cfg.HTTP[defaultTarget] = HTTP{
|
||||
Endpoint: "https://username:password@example.com/api",
|
||||
}
|
||||
|
||||
// Create an example Audit logger
|
||||
cfg.Audit[defaultTarget] = HTTP{
|
||||
Endpoint: "https://username:password@example.com/api/audit",
|
||||
}
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
// LookupConfig - lookup logger config, override with ENVs if set.
|
||||
func LookupConfig(cfg Config) (Config, error) {
|
||||
envs := env.List(EnvLoggerHTTPEndpoint)
|
||||
|
||||
Reference in New Issue
Block a user