satellite/metainfo: Homogenize object operations logs
We log metainfo object operations and it looks that the log's message convention is `Object {operation}`, however the `Object Download` operation didn't match with the actual operation and the one that was representing it had was `Download Object`. This commit changes the log's message for the download object operation according to the other object operations log messages format and fixes the log message for the Get Object operation. For finding this I executed the following command at the root of the repository to obtain the list of lines where we log object operations. $> ag 'log\.Info\(".*Object.*",' --no-color git:(main) satellite/metainfo/endpoint_object.go 179: endpoint.log.Info("Object Upload", zap.Stringer("Project ID", keyInfo.ProjectID), zap.String("operation", "put"), zap.String("type", "object")) 336: endpoint.log.Info("Object Download", zap.Stringer("Project ID", keyInfo.ProjectID), zap.String("operation", "get"), zap.String("type", "object")) 557: endpoint.log.Info("Download Object", zap.Stringer("Project ID", keyInfo.ProjectID), zap.String("operation", "download"), zap.String("type", "object")) 791: endpoint.log.Info("Object List", zap.Stringer("Project ID", keyInfo.ProjectID), zap.String("operation", "list"), zap.String("type", "object")) 979: endpoint.log.Info("Object Delete", zap.Stringer("Project ID", keyInfo.ProjectID), zap.String("operation", "delete"), zap.String("type", "object")) `ag` is a command-line tool similar to `grep` Change-Id: I9072c5967eb42c397a2c64761d843675dd4991ec
This commit is contained in:
parent
0036ec99cf
commit
c5abc0de6f
@ -333,7 +333,7 @@ func (endpoint *Endpoint) GetObject(ctx context.Context, req *pb.ObjectGetReques
|
||||
return nil, rpcstatus.Error(rpcstatus.Internal, err.Error())
|
||||
}
|
||||
|
||||
endpoint.log.Info("Object Download", zap.Stringer("Project ID", keyInfo.ProjectID), zap.String("operation", "get"), zap.String("type", "object"))
|
||||
endpoint.log.Info("Object Get", zap.Stringer("Project ID", keyInfo.ProjectID), zap.String("operation", "get"), zap.String("type", "object"))
|
||||
mon.Meter("req_get_object").Mark(1)
|
||||
|
||||
return &pb.ObjectGetResponse{Object: object}, nil
|
||||
@ -554,7 +554,7 @@ func (endpoint *Endpoint) DownloadObject(ctx context.Context, req *pb.ObjectDown
|
||||
return nil, rpcstatus.Error(rpcstatus.Internal, err.Error())
|
||||
}
|
||||
|
||||
endpoint.log.Info("Download Object", zap.Stringer("Project ID", keyInfo.ProjectID), zap.String("operation", "download"), zap.String("type", "object"))
|
||||
endpoint.log.Info("Object Download", zap.Stringer("Project ID", keyInfo.ProjectID), zap.String("operation", "download"), zap.String("type", "object"))
|
||||
mon.Meter("req_download_object").Mark(1)
|
||||
|
||||
return &pb.ObjectDownloadResponse{
|
||||
|
Loading…
Reference in New Issue
Block a user