@@ -95,7 +95,7 @@ func (s *service) Register(gs *grpc.Server) error {
95
95
}
96
96
97
97
func (s * service ) Prepare (ctx context.Context , pr * snapshotsapi.PrepareSnapshotRequest ) (* snapshotsapi.PrepareSnapshotResponse , error ) {
98
- log .G (ctx ).WithField ( "parent" , pr .Parent ). WithField ( "key" , pr .Key ).Debugf ("prepare snapshot" )
98
+ log .G (ctx ).WithFields (log. Fields { "parent" : pr .Parent , "key" : pr .Key , "snapshotter" : pr . Snapshotter } ).Debugf ("prepare snapshot" )
99
99
sn , err := s .getSnapshotter (pr .Snapshotter )
100
100
if err != nil {
101
101
return nil , err
@@ -116,7 +116,7 @@ func (s *service) Prepare(ctx context.Context, pr *snapshotsapi.PrepareSnapshotR
116
116
}
117
117
118
118
func (s * service ) View (ctx context.Context , pr * snapshotsapi.ViewSnapshotRequest ) (* snapshotsapi.ViewSnapshotResponse , error ) {
119
- log .G (ctx ).WithField ( "parent" , pr .Parent ). WithField ( "key" , pr .Key ).Debugf ("prepare view snapshot" )
119
+ log .G (ctx ).WithFields (log. Fields { "parent" : pr .Parent , "key" : pr .Key , "snapshotter" : pr . Snapshotter } ).Debugf ("prepare view snapshot" )
120
120
sn , err := s .getSnapshotter (pr .Snapshotter )
121
121
if err != nil {
122
122
return nil , err
@@ -135,7 +135,7 @@ func (s *service) View(ctx context.Context, pr *snapshotsapi.ViewSnapshotRequest
135
135
}
136
136
137
137
func (s * service ) Mounts (ctx context.Context , mr * snapshotsapi.MountsRequest ) (* snapshotsapi.MountsResponse , error ) {
138
- log .G (ctx ).WithField ( "key" , mr .Key ).Debugf ("get snapshot mounts" )
138
+ log .G (ctx ).WithFields (log. Fields { "key" : mr .Key , "snapshotter" : mr . Snapshotter } ).Debugf ("get snapshot mounts" )
139
139
sn , err := s .getSnapshotter (mr .Snapshotter )
140
140
if err != nil {
141
141
return nil , err
@@ -151,7 +151,7 @@ func (s *service) Mounts(ctx context.Context, mr *snapshotsapi.MountsRequest) (*
151
151
}
152
152
153
153
func (s * service ) Commit (ctx context.Context , cr * snapshotsapi.CommitSnapshotRequest ) (* ptypes.Empty , error ) {
154
- log .G (ctx ).WithField ( "key" , cr .Key ). WithField ( "name" , cr .Name ).Debugf ("commit snapshot" )
154
+ log .G (ctx ).WithFields (log. Fields { "key" : cr .Key , "snapshotter" : cr . Snapshotter , "name" : cr .Name } ).Debugf ("commit snapshot" )
155
155
sn , err := s .getSnapshotter (cr .Snapshotter )
156
156
if err != nil {
157
157
return nil , err
@@ -170,7 +170,7 @@ func (s *service) Commit(ctx context.Context, cr *snapshotsapi.CommitSnapshotReq
170
170
}
171
171
172
172
func (s * service ) Remove (ctx context.Context , rr * snapshotsapi.RemoveSnapshotRequest ) (* ptypes.Empty , error ) {
173
- log .G (ctx ).WithField ( "key" , rr .Key ).Debugf ("remove snapshot" )
173
+ log .G (ctx ).WithFields (log. Fields { "key" : rr .Key , "snapshotter" : rr . Snapshotter } ).Debugf ("remove snapshot" )
174
174
sn , err := s .getSnapshotter (rr .Snapshotter )
175
175
if err != nil {
176
176
return nil , err
@@ -184,7 +184,7 @@ func (s *service) Remove(ctx context.Context, rr *snapshotsapi.RemoveSnapshotReq
184
184
}
185
185
186
186
func (s * service ) Stat (ctx context.Context , sr * snapshotsapi.StatSnapshotRequest ) (* snapshotsapi.StatSnapshotResponse , error ) {
187
- log .G (ctx ).WithField ( "key" , sr .Key ).Debugf ("stat snapshot" )
187
+ log .G (ctx ).WithFields (log. Fields { "key" : sr .Key , "snapshotter" : sr . Snapshotter } ).Debugf ("stat snapshot" )
188
188
sn , err := s .getSnapshotter (sr .Snapshotter )
189
189
if err != nil {
190
190
return nil , err
@@ -199,7 +199,7 @@ func (s *service) Stat(ctx context.Context, sr *snapshotsapi.StatSnapshotRequest
199
199
}
200
200
201
201
func (s * service ) Update (ctx context.Context , sr * snapshotsapi.UpdateSnapshotRequest ) (* snapshotsapi.UpdateSnapshotResponse , error ) {
202
- log .G (ctx ).WithField ( "key" , sr .Info .Name ).Debugf ("update snapshot" )
202
+ log .G (ctx ).WithFields (log. Fields { "key" : sr .Info .Name , "snapshotter" : sr . Snapshotter } ).Debugf ("update snapshot" )
203
203
sn , err := s .getSnapshotter (sr .Snapshotter )
204
204
if err != nil {
205
205
return nil , err
0 commit comments