mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Remove "logger" field from config.json (#5268)
File logging removed as part of improvement to server logging. config.json format updated to version 21. Fixes #5176
This commit is contained in:
committed by
Nitish Tiwari
parent
eb2894233c
commit
a1c1a18dc5
@@ -36,9 +36,9 @@ import (
|
||||
// 6. Make changes in config-current_test.go for any test change
|
||||
|
||||
// Config version
|
||||
const serverConfigVersion = "20"
|
||||
const serverConfigVersion = "21"
|
||||
|
||||
type serverConfig = serverConfigV20
|
||||
type serverConfig = serverConfigV21
|
||||
|
||||
var (
|
||||
// globalServerConfig server config.
|
||||
@@ -71,7 +71,7 @@ func (s *serverConfig) GetRegion() string {
|
||||
return s.Region
|
||||
}
|
||||
|
||||
// SetCredentials set new credentials. SetCredential returns the previous credential.
|
||||
// SetCredential sets new credential and returns the previous credential.
|
||||
func (s *serverConfig) SetCredential(creds auth.Credentials) (prevCred auth.Credentials) {
|
||||
s.Lock()
|
||||
defer s.Unlock()
|
||||
@@ -126,13 +126,9 @@ func newServerConfig() *serverConfig {
|
||||
Credential: auth.MustGetNewCredentials(),
|
||||
Region: globalMinioDefaultRegion,
|
||||
Browser: true,
|
||||
Logger: &loggers{},
|
||||
Notify: ¬ifier{},
|
||||
}
|
||||
|
||||
// Enable console logger by default on a fresh run.
|
||||
srvCfg.Logger.Console = NewConsoleLogger()
|
||||
|
||||
// Make sure to initialize notification configs.
|
||||
srvCfg.Notify.AMQP = make(map[string]amqpNotify)
|
||||
srvCfg.Notify.AMQP["1"] = amqpNotify{}
|
||||
@@ -274,11 +270,6 @@ func getValidConfig() (*serverConfig, error) {
|
||||
return nil, errors.New("invalid credential in config file " + configFile)
|
||||
}
|
||||
|
||||
// Validate logger field
|
||||
if err = srvCfg.Logger.Validate(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Validate notify field
|
||||
if err = srvCfg.Notify.Validate(); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user