forked from TrueCloudLab/frostfs-node
[#240] logs: Move log messages to constants
Drop duplicate entities. Format entities. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com> Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
d29b13454f
commit
0e31c12e63
149 changed files with 1481 additions and 687 deletions
|
@ -3,6 +3,7 @@ package deletesvc
|
|||
import (
|
||||
"context"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/util"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
@ -34,7 +35,7 @@ func (s *Service) Delete(ctx context.Context, prm Prm) error {
|
|||
}
|
||||
|
||||
func (exec *execCtx) execute(ctx context.Context) {
|
||||
exec.log.Debug("serving request...")
|
||||
exec.log.Debug(logs.DeleteServingRequest)
|
||||
|
||||
// perform local operation
|
||||
exec.executeLocal(ctx)
|
||||
|
@ -46,9 +47,9 @@ func (exec *execCtx) analyzeStatus(execCnr bool) {
|
|||
// analyze local result
|
||||
switch exec.status {
|
||||
case statusOK:
|
||||
exec.log.Debug("operation finished successfully")
|
||||
exec.log.Debug(logs.DeleteOperationFinishedSuccessfully)
|
||||
default:
|
||||
exec.log.Debug("operation finished with error",
|
||||
exec.log.Debug(logs.DeleteOperationFinishedWithError,
|
||||
zap.String("error", exec.err.Error()),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue