1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #1567 from daehyeok/logrus_formating

Refactoring logrus import and formatting
This commit is contained in:
Madhu Venugopal 2016-12-02 16:02:57 -08:00 committed by GitHub
commit 48c4c81cb1

View file

@ -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)
}
})
}