Report XDS-server connection failure as an error.
[src/xds/xds-agent.git] / lib / agent / webserver.go
index 3622efe..2f24c6c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 "IoT.bzh"
+ * Copyright (C) 2017-2018 "IoT.bzh"
  * Author Sebastien Douheret <sebastien@iot.bzh>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,11 +24,12 @@ import (
        "os"
        "path"
 
+       socketio "github.com/googollee/go-socket.io"
+
+       "gerrit.automotivelinux.org/gerrit/src/xds/xds-agent/lib/xaapiv1"
        "github.com/Sirupsen/logrus"
        "github.com/gin-contrib/static"
        "github.com/gin-gonic/gin"
-       "github.com/googollee/go-socket.io"
-       "github.com/iotbzh/xds-agent/lib/xaapiv1"
 )
 
 // WebServer .
@@ -93,7 +94,7 @@ func (s *WebServer) Serve() error {
                for _, svrCfg := range s.Config.FileConf.ServersConf {
                        if svr, err := s.api.AddXdsServer(svrCfg); err != nil {
                                // Just log error, don't consider as critical
-                               s.Log.Infof("Cannot connect to XDS Server url=%s: %v", svr.BaseURL, err.Error())
+                               s.Log.Errorf("Cannot connect to XDS Server url=%s: %v", svr.BaseURL, err.Error())
                        }
                }
        }()