From e5c3c44d2e39bd023a626ded70ff738c3afb8304 Mon Sep 17 00:00:00 2001 From: Gavriel Hirsch Date: Mon, 2 May 2022 17:11:15 -0700 Subject: [PATCH] increase level of plugin exit logs --- client.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index 67dca883..295c6921 100644 --- a/client.go +++ b/client.go @@ -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 write 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