[#240] logs: Factor out common service log messages

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-04-13 15:51:36 +03:00 committed by fyrchik
parent 0e31c12e63
commit cffcc7745e
15 changed files with 53 additions and 64 deletions

View file

@ -35,7 +35,7 @@ func (s *Service) Delete(ctx context.Context, prm Prm) error {
}
func (exec *execCtx) execute(ctx context.Context) {
exec.log.Debug(logs.DeleteServingRequest)
exec.log.Debug(logs.ServingRequest)
// perform local operation
exec.executeLocal(ctx)
@ -47,9 +47,9 @@ func (exec *execCtx) analyzeStatus(execCnr bool) {
// analyze local result
switch exec.status {
case statusOK:
exec.log.Debug(logs.DeleteOperationFinishedSuccessfully)
exec.log.Debug(logs.OperationFinishedSuccessfully)
default:
exec.log.Debug(logs.DeleteOperationFinishedWithError,
exec.log.Debug(logs.OperationFinishedWithError,
zap.String("error", exec.err.Error()),
)