Commit acf31c31 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

communicator/ssh: update logging

parent 310d37db
...@@ -240,19 +240,19 @@ func (c *comm) connectToAgent() { ...@@ -240,19 +240,19 @@ func (c *comm) connectToAgent() {
// open connection to the local agent // open connection to the local agent
socketLocation := os.Getenv("SSH_AUTH_SOCK") socketLocation := os.Getenv("SSH_AUTH_SOCK")
if socketLocation == "" { if socketLocation == "" {
log.Printf("no local agent socket") log.Printf("[INFO] no local agent socket, will not connect agent")
return return
} }
agentConn, err := net.Dial("unix", socketLocation) agentConn, err := net.Dial("unix", socketLocation)
if err != nil { if err != nil {
log.Printf("could not connect to local agent socket: %s", socketLocation) log.Printf("[ERROR] could not connect to local agent socket: %s", socketLocation)
return return
} }
// create agent and add in auth // create agent and add in auth
forwardingAgent := agent.NewClient(agentConn) forwardingAgent := agent.NewClient(agentConn)
if forwardingAgent == nil { if forwardingAgent == nil {
log.Printf("could not create agent client") log.Printf("[ERROR] Could not create agent client")
agentConn.Close() agentConn.Close()
return return
} }
...@@ -272,11 +272,11 @@ func (c *comm) connectToAgent() { ...@@ -272,11 +272,11 @@ func (c *comm) connectToAgent() {
err = agent.RequestAgentForwarding(session) err = agent.RequestAgentForwarding(session)
if err != nil { if err != nil {
log.Printf("RequestAgentForwarding:", err) log.Printf("[ERROR] RequestAgentForwarding: %#v", err)
return return
} }
log.Printf("agent forwarding enabled") log.Printf("[INFO] agent forwarding enabled")
return return
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment