From 26e9904e0278405d216831c54790b71a93ed993b Mon Sep 17 00:00:00 2001 From: Chuck Ha Date: Mon, 15 Jul 2019 14:52:01 -0400 Subject: [PATCH] Fix logging panic Signed-off-by: Chuck Ha --- logger/logger.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logger/logger.go b/logger/logger.go index 0beb312..eb1f123 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -28,5 +28,6 @@ type Log struct { } func (k Log) Error(err error, msg string, keysAndValues ...interface{}) { - k.Logger.Error(err, msg, "stacktrace", fmt.Sprintf("%+v", err), keysAndValues) + keysAndValues = append(keysAndValues, "stacktrace", fmt.Sprintf("%+v", err)) + k.Logger.Error(err, msg, keysAndValues...) }