always use groupResource.String() when logging (fixes #2795) (#2796)

Signed-off-by: Benoit Gagnon <benoit.gagnon@ubisoft.com>
This commit is contained in:
Benoit Gagnon
2020-08-06 10:10:59 -07:00
committed by GitHub
parent 19e65689ef
commit 0e8a7a23cb
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
Fix inconsistent type for the "resource" structured logging field
+1 -1
View File
@@ -73,7 +73,7 @@ func (ib *itemBackupper) backupItem(logger logrus.FieldLogger, obj runtime.Unstr
name := metadata.GetName()
log := logger.WithField("name", name)
log = log.WithField("resource", groupResource)
log = log.WithField("resource", groupResource.String())
log = log.WithField("namespace", namespace)
if metadata.GetLabels()["velero.io/exclude-from-backup"] == "true" {