summaryrefslogtreecommitdiff
path: root/client/client.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-01-05 17:25:33 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2023-01-05 18:04:48 +0100
commit5ffd0a395f7ef61b75b6ef4b625e78da7900e249 (patch)
treea85cf3842d7fdf860b9b6f3e5ca04730635a5141 /client/client.go
parent4e4879042a0737463cd3ca00e95d621d410921e4 (diff)
Logger: Do not interpret error string as format specifier argument
Diffstat (limited to 'client/client.go')
-rw-r--r--client/client.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/client.go b/client/client.go
index b37c506..6dae665 100644
--- a/client/client.go
+++ b/client/client.go
@@ -2,6 +2,7 @@
package client
import (
+ "fmt"
"strings"
"github.com/eduvpn/eduvpn-common/internal/config"
@@ -24,9 +25,9 @@ type (
func (c *Client) logError(err error) {
// Logs the error with the same level/verbosity as the error
if c.Debug {
- c.Logger.Inheritf(err, "\nwith stacktrace: %s\n", err.(*errors.Error).ErrorStack())
+ c.Logger.Inherit(err, fmt.Sprintf("\nwith stacktrace: %s\n", err.(*errors.Error).ErrorStack()))
} else {
- c.Logger.Inheritf(err, "")
+ c.Logger.Inherit(err, "")
}
}