From ea11c5eedc26d733207b156f0614ffaf700de9fc Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Thu, 24 Mar 2016 18:16:57 +0000 Subject: [PATCH] cosmetic: some error logging message tweaks --- plugin/net/driver.go | 4 ++-- plugin/net/watcher.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/net/driver.go b/plugin/net/driver.go index 673066d7..4566137a 100644 --- a/plugin/net/driver.go +++ b/plugin/net/driver.go @@ -113,7 +113,7 @@ func (driver *driver) JoinEndpoint(j *api.JoinRequest) (*api.JoinResponse, error } if err := netlink.LinkSetUp(local); err != nil { - return nil, errorf(`unable to bring veth up: %s`, err) + return nil, errorf(`unable to bring up veth: %s`, err) } ifname := &api.InterfaceName{ @@ -171,7 +171,7 @@ func createAndAttach(id, bridgeName string, mtu int) (*netlink.Veth, error) { return nil, errorf(`failed to attach "%s" to device "%s": %s`, local.Name, bridgeName, err) } default: - return nil, errorf(`device "%s" not a bridge`, bridgeName) + return nil, errorf(`device "%s" is not a bridge`, bridgeName) } return local, nil } diff --git a/plugin/net/watcher.go b/plugin/net/watcher.go index 6bcb9ee6..4f8ec364 100644 --- a/plugin/net/watcher.go +++ b/plugin/net/watcher.go @@ -27,10 +27,10 @@ func NewWatcher(client *docker.Client, weave *weaveapi.Client, driver *driver) ( } func (w *watcher) ContainerStarted(id string) { - Log.Debugf("Container started %s", id) + Log.Debugf("Container %s started", id) info, err := w.client.InspectContainer(id) if err != nil { - Log.Warningf("error inspecting container: %s", err) + Log.Warningf("error inspecting container %s: %s", id, err) return } // check that it's on our network, via the endpointID @@ -38,7 +38,7 @@ func (w *watcher) ContainerStarted(id string) { if w.driver.HasEndpoint(net.EndpointID) { fqdn := fmt.Sprintf("%s.%s", info.Config.Hostname, info.Config.Domainname) if err := w.weave.RegisterWithDNS(id, fqdn, net.IPAddress); err != nil { - Log.Warningf("unable to register with weaveDNS: %s", err) + Log.Warningf("unable to register %s with weaveDNS: %s", id, err) } } }