Skip to content

Commit d26b694

Browse files
authored
remove logging for missing SecureConfig (#238)
In #207 we introduced a warning if the `SecureConfig` is unset. For Nomad and other applications that have "internal" go-plugin consumers where the application runs itself as a plugin, this causes spurious warn-level logs. For Nomad in particular this means every task driver and logmon invocation emits the log, which is our primary operation. Setting a `SecureConfig` isn't required, and if a given go-plugin consumer requires it to be, this seems more like a programming error than a runtime error. Remove the log line.
1 parent 84014b7 commit d26b694

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

client.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,7 @@ func (c *Client) Start() (addr net.Addr, err error) {
568568
return nil, err
569569
}
570570

571-
if c.config.SecureConfig == nil {
572-
c.logger.Warn("plugin configured with a nil SecureConfig")
573-
} else {
571+
if c.config.SecureConfig != nil {
574572
if ok, err := c.config.SecureConfig.Check(cmd.Path); err != nil {
575573
return nil, fmt.Errorf("error verifying checksum: %s", err)
576574
} else if !ok {

0 commit comments

Comments
 (0)