virtcontainers: log type of proxy started

In order to see what proxy was started or not, we should log
its type and the URL

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
Julio Montes 2018-07-23 11:43:52 -05:00
parent 4680e58e08
commit 3adc8626e8
3 changed files with 3 additions and 0 deletions

View File

@ -1200,6 +1200,7 @@ func (k *kataAgent) connect() error {
return nil
}
k.Logger().WithField("url", k.state.URL).Info("New client")
client, err := kataclient.NewAgentClient(k.state.URL, k.proxyBuiltIn)
if err != nil {
return err

View File

@ -24,6 +24,7 @@ func (p *kataProxy) consoleWatched() bool {
// start is kataProxy start implementation for proxy interface.
func (p *kataProxy) start(sandbox *Sandbox, params proxyParams) (int, string, error) {
sandbox.Logger().Info("Starting regular Kata proxy rather than built-in")
if sandbox.agent == nil {
return -1, "", fmt.Errorf("No agent")
}

View File

@ -24,6 +24,7 @@ type noProxy struct {
// start is noProxy start implementation for proxy interface.
func (p *noProxy) start(sandbox *Sandbox, params proxyParams) (int, string, error) {
sandbox.Logger().Info("No proxy started because of no-proxy implementation")
if params.agentURL == "" {
return -1, "", fmt.Errorf("AgentURL cannot be empty")
}