special logging fields: from now on only 'job', 'task', 'subsystem'

This commit is contained in:
Christian Schwarz
2018-08-25 22:15:37 +02:00
parent e30ae972f4
commit 861e5f8313
5 changed files with 13 additions and 30 deletions
+3 -2
View File
@@ -48,7 +48,7 @@ func (a *IntervalAutosnap) findSyncPoint(fss []*zfs.DatasetPath) (syncPoint time
a.task.Log().Debug("examine filesystem state")
for _, d := range fss {
l := a.task.Log().WithField(logFSField, d.ToString())
l := a.task.Log().WithField("fs", d.ToString())
fsvs, err := zfs.ZFSListFilesystemVersions(d, NewPrefixFilter(a.Prefix))
if err != nil {
@@ -175,7 +175,8 @@ func (a *IntervalAutosnap) doSnapshots(didSnaps chan struct{}) {
suffix := time.Now().In(time.UTC).Format("20060102_150405_000")
snapname := fmt.Sprintf("%s%s", a.Prefix, suffix)
l := a.task.Log().WithField(logFSField, d.ToString()).
l := a.task.Log().
WithField("fs", d.ToString()).
WithField("snapname", snapname)
l.Info("create snapshot")