Skip to content

Commit 23ca089

Browse files
committed
Use '"' rather than '`' in the log to avoid unexpected new line
Use '"' rather than '`' in the log to avoid unexpected new line Signed-off-by: Wenkai Yin(尹文开) <[email protected]>
1 parent 10260bd commit 23ca089

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

pkg/backup/item_collector.go

+3-6
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ func (nt *nsTracker) init(
116116
for _, namespace := range unstructuredNSs {
117117
if nt.singleLabelSelector != nil &&
118118
nt.singleLabelSelector.Matches(labels.Set(namespace.GetLabels())) {
119-
nt.logger.Debugf(`Track namespace %s,
120-
because its labels match backup LabelSelector.`,
119+
nt.logger.Debugf("Track namespace %s, because its labels match backup LabelSelector.",
121120
namespace.GetName(),
122121
)
123122

@@ -128,8 +127,7 @@ func (nt *nsTracker) init(
128127
if len(nt.orLabelSelector) > 0 {
129128
for _, selector := range nt.orLabelSelector {
130129
if selector.Matches(labels.Set(namespace.GetLabels())) {
131-
nt.logger.Debugf(`Track namespace %s",
132-
"because its labels match the backup OrLabelSelector.`,
130+
nt.logger.Debugf("Track namespace %s, because its labels match the backup OrLabelSelector.",
133131
namespace.GetName(),
134132
)
135133
nt.track(namespace.GetName())
@@ -148,8 +146,7 @@ func (nt *nsTracker) init(
148146
}
149147

150148
if nt.namespaceFilter.ShouldInclude(namespace.GetName()) {
151-
nt.logger.Debugf(`Track namespace %s,
152-
because its name match the backup namespace filter.`,
149+
nt.logger.Debugf("Track namespace %s, because its name match the backup namespace filter.",
153150
namespace.GetName(),
154151
)
155152
nt.track(namespace.GetName())

pkg/util/csi/volume_snapshot.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,7 @@ func GetVolumeSnapshotClassForStorageClass(
424424
return &vsClass, nil
425425
}
426426
return nil, fmt.Errorf(
427-
`failed to get VolumeSnapshotClass for provisioner %s,
428-
ensure that the desired VolumeSnapshot class has the %s label`,
427+
"failed to get VolumeSnapshotClass for provisioner %s, ensure that the desired VolumeSnapshot class has the %s label",
429428
provisioner, velerov1api.VolumeSnapshotClassSelectorLabel)
430429
}
431430

0 commit comments

Comments
 (0)