From d05e907169e1993b4b829474a7e9e9892f75129e Mon Sep 17 00:00:00 2001 From: Donovan Carthew Date: Tue, 30 Jul 2019 21:06:43 +0200 Subject: [PATCH] Fixup - use format type in default_logger to setup logger --- pkg/util/logging/default_logger.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/logging/default_logger.go b/pkg/util/logging/default_logger.go index 0c136d34cd..5586ebac5a 100644 --- a/pkg/util/logging/default_logger.go +++ b/pkg/util/logging/default_logger.go @@ -1,5 +1,5 @@ /* -Copyright 2018 the Velero contributors. +Copyright 2019 the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ func DefaultHooks() []logrus.Hook { func DefaultLogger(level logrus.Level, format Format) *logrus.Logger { logger := logrus.New() - if (string(format)) == "json" { + if format == FormatJSON { logger.Formatter = new(logrus.JSONFormatter) }