Skip to content

Commit

Permalink
Refine getbackup log
Browse files Browse the repository at this point in the history
Signed-off-by: wayblink <anyang.wang@zilliz.com>
  • Loading branch information
wayblink authored and yelusion2 committed Oct 16, 2023
1 parent 3089ba0 commit e73efd4
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions core/backup_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

gomilvus "github.com/milvus-io/milvus-sdk-go/v2/client"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/zilliztech/milvus-backup/core/paramtable"
"github.com/zilliztech/milvus-backup/core/proto/backuppb"
Expand Down Expand Up @@ -240,13 +241,23 @@ func (b *BackupContext) GetBackup(ctx context.Context, request *backuppb.GetBack
resp = SimpleBackupResponse(resp)
}

log.Info("finish GetBackupRequest",
zap.String("requestId", request.GetRequestId()),
zap.String("backupName", request.GetBackupName()),
zap.String("backupId", request.GetBackupId()),
zap.String("bucketName", request.GetBucketName()),
zap.String("path", request.GetPath()),
zap.Any("resp", resp))
if log.GetLevel() == zapcore.DebugLevel {
log.Debug("finish GetBackupRequest",
zap.String("requestId", request.GetRequestId()),
zap.String("backupName", request.GetBackupName()),
zap.String("backupId", request.GetBackupId()),
zap.String("bucketName", request.GetBucketName()),
zap.String("path", request.GetPath()),
zap.Any("resp", resp))
} else {
log.Info("finish GetBackupRequest",
zap.String("requestId", request.GetRequestId()),
zap.String("backupName", request.GetBackupName()),
zap.String("backupId", request.GetBackupId()),
zap.String("bucketName", request.GetBucketName()),
zap.String("path", request.GetPath()))
}

return resp
}

Expand Down

0 comments on commit e73efd4

Please sign in to comment.