Skip to content

Commit e4102ee

Browse files
authored
Merge pull request #195 from hashicorp/exit-log-level
increase level of plugin exit logs
2 parents 73def4e + 18a4e1f commit e4102ee

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

client.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -629,17 +629,19 @@ func (c *Client) Start() (addr net.Addr, err error) {
629629
// Wait for the command to end.
630630
err := cmd.Wait()
631631

632-
debugMsgArgs := []interface{}{
632+
msgArgs := []interface{}{
633633
"path", path,
634634
"pid", pid,
635635
}
636636
if err != nil {
637-
debugMsgArgs = append(debugMsgArgs,
637+
msgArgs = append(msgArgs,
638638
[]interface{}{"error", err.Error()}...)
639+
c.logger.Error("plugin process exited", msgArgs...)
640+
} else {
641+
// Log and make sure to flush the logs right away
642+
c.logger.Info("plugin process exited", msgArgs...)
639643
}
640644

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

645647
// Set that we exited, which takes a lock

0 commit comments

Comments
 (0)