forked from TrueCloudLab/frostfs-node
[#240] logs: Factor out common service log messages
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
0e31c12e63
commit
cffcc7745e
15 changed files with 53 additions and 64 deletions
|
@ -84,7 +84,7 @@ func (s *Service) get(ctx context.Context, prm commonPrm, opts ...execOption) st
|
|||
}
|
||||
|
||||
func (exec *execCtx) execute(ctx context.Context) {
|
||||
exec.log.Debug(logs.GetServingRequest)
|
||||
exec.log.Debug(logs.ServingRequest)
|
||||
|
||||
// perform local operation
|
||||
exec.executeLocal(ctx)
|
||||
|
@ -96,7 +96,7 @@ func (exec *execCtx) analyzeStatus(ctx context.Context, execCnr bool) {
|
|||
// analyze local result
|
||||
switch exec.status {
|
||||
case statusOK:
|
||||
exec.log.Debug(logs.GetOperationFinishedSuccessfully)
|
||||
exec.log.Debug(logs.OperationFinishedSuccessfully)
|
||||
case statusINHUMED:
|
||||
exec.log.Debug(logs.GetRequestedObjectWasMarkedAsRemoved)
|
||||
case statusVIRTUAL:
|
||||
|
@ -105,7 +105,7 @@ func (exec *execCtx) analyzeStatus(ctx context.Context, execCnr bool) {
|
|||
case statusOutOfRange:
|
||||
exec.log.Debug(logs.GetRequestedRangeIsOutOfObjectBounds)
|
||||
default:
|
||||
exec.log.Debug(logs.GetOperationFinishedWithError,
|
||||
exec.log.Debug(logs.OperationFinishedWithError,
|
||||
zap.String("error", exec.err.Error()),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue