fix: log level overwritten by dockerCli.Initialize()

This commit is contained in:
iwilltry42 2021-07-23 10:20:29 +02:00
parent 25c6f65948
commit 5364bd1300
No known key found for this signature in database
GPG Key ID: 7BA57AD1CFF16110

View File

@ -174,7 +174,10 @@ func GetDockerClient() (*client.Client, error) {
return nil, err
}
err = dockerCli.Initialize(flags.NewClientOptions())
newClientOpts := flags.NewClientOptions()
newClientOpts.Common.LogLevel = log.GetLevel().String() // this is needed, as the following Initialize() call will set a new log level on the global logrus instance
err = dockerCli.Initialize(newClientOpts)
if err != nil {
return nil, err
}