improve logging in proxy

- always info-log when we encounter an 'interesting' container
- s/CIDR/WEAVE_CIDR
- some other minor tweaks
This commit is contained in:
Matthias Radestock committed 2015-05-19 19:46:53 +01:00
1 parent fe36da2041
commit f7f0369bff
3 files changed
+10 -4

No files matched your search

+4 -1
View File
@@ -5,8 +5,10 @@ import (
"encoding/json"
"io/ioutil"
"net/http"
"strings"
"github.com/fsouza/go-dockerclient"
. "github.com/weaveworks/weave/common"
)
type createContainerInterceptor struct {
@@ -33,7 +35,8 @@ func (i *createContainerInterceptor) InterceptRequest(r *http.Request) error {
return err
}
if _, ok := weaveCIDRsFromConfig(container.Config); ok {
if cidrs, ok := weaveCIDRsFromConfig(container.Config); ok {
Info.Printf("Creating container with WEAVE_CIDR \"%s\"", strings.Join(cidrs, " "))
container.HostConfig.VolumesFrom = append(container.HostConfig.VolumesFrom, "weaveproxy")
if err := i.setWeaveWaitEntrypoint(container.Config); err != nil {
return err