mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Address review comments a.d. logging.
This commit is contained in:
@@ -57,8 +57,9 @@ func startEtcdOrProxyV2(args []string) {
|
||||
|
||||
err := cfg.parse(args[1:])
|
||||
lg := cfg.ec.GetLogger()
|
||||
cfg.ec.SetupGlobalLoggers()
|
||||
|
||||
// If we failed to parse the whole configuration, print the error using
|
||||
// preferably the resolved logger from the config,
|
||||
// but if does not exists, create a new temporary logger.
|
||||
if lg == nil {
|
||||
var zapError error
|
||||
// use this logger
|
||||
@@ -78,6 +79,8 @@ func startEtcdOrProxyV2(args []string) {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
cfg.ec.SetupGlobalLoggers()
|
||||
|
||||
defer func() {
|
||||
logger := cfg.ec.GetLogger()
|
||||
if logger != nil {
|
||||
|
||||
Reference in New Issue
Block a user