mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Refactoring logrus import and formatting
Fix import name to use original project name 'logrus' instead of 'log' Removing `f` from `logrus.Debugf` when formatting string is not present. Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
This commit is contained in:
parent
380be4c029
commit
0f745fbb23
1 changed files with 6 additions and 5 deletions
|
@ -2,9 +2,10 @@ package bridge
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/docker/libnetwork/iptables"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/libnetwork/iptables"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -40,14 +41,14 @@ func setupIPForwarding(enableIPTables bool) error {
|
|||
}
|
||||
if err := iptables.SetDefaultPolicy(iptables.Filter, "FORWARD", iptables.Drop); err != nil {
|
||||
if err := configureIPForwarding(false); err != nil {
|
||||
log.Errorf("Disabling IP forwarding failed, %v", err)
|
||||
logrus.Errorf("Disabling IP forwarding failed, %v", err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
iptables.OnReloaded(func() {
|
||||
log.Debugf("Setting the default DROP policy on firewall reload")
|
||||
logrus.Debug("Setting the default DROP policy on firewall reload")
|
||||
if err := iptables.SetDefaultPolicy(iptables.Filter, "FORWARD", iptables.Drop); err != nil {
|
||||
log.Warnf("Settig the default DROP policy on firewall reload failed, %v", err)
|
||||
logrus.Warnf("Settig the default DROP policy on firewall reload failed, %v", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue