Skip to content

Commit

Permalink
Merge pull request #195 from hashicorp/exit-log-level
Browse files Browse the repository at this point in the history
increase level of plugin exit logs
  • Loading branch information
gavriel-hc committed May 3, 2022
2 parents 73def4e + 18a4e1f commit e4102ee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions client.go
Expand Up @@ -629,17 +629,19 @@ func (c *Client) Start() (addr net.Addr, err error) {
// Wait for the command to end.
err := cmd.Wait()

debugMsgArgs := []interface{}{
msgArgs := []interface{}{
"path", path,
"pid", pid,
}
if err != nil {
debugMsgArgs = append(debugMsgArgs,
msgArgs = append(msgArgs,
[]interface{}{"error", err.Error()}...)
c.logger.Error("plugin process exited", msgArgs...)
} else {
// Log and make sure to flush the logs right away
c.logger.Info("plugin process exited", msgArgs...)
}

// Log and make sure to flush the logs write away
c.logger.Debug("plugin process exited", debugMsgArgs...)
os.Stderr.Sync()

// Set that we exited, which takes a lock
Expand Down

0 comments on commit e4102ee

Please sign in to comment.