From c7a79991f82a7e472c1767e5e56a96fde485d9ae Mon Sep 17 00:00:00 2001 From: Kun Huang Date: Mon, 15 Jul 2013 15:43:56 +0800 Subject: [PATCH] log return value before arguments when rsync error The arguments of rsync command seems too long. If some errors occur, it is hard to debug. Moving return value of rsync command first could help people at least know reason of rsync error by manuals. fixes bug #903406 Change-Id: I1cac7bbca74824a6d47e6ceb9f654d4046fcbb9e --- swift/obj/replicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/obj/replicator.py b/swift/obj/replicator.py index 21d59d0822..391fc85a24 100644 --- a/swift/obj/replicator.py +++ b/swift/obj/replicator.py @@ -111,7 +111,7 @@ class ObjectReplicator(Daemon): else: self.logger.error(result) if ret_val: - self.logger.error(_('Bad rsync return code: %(args)s -> %(ret)d'), + self.logger.error(_('Bad rsync return code: %(ret)d <- %(args)s'), {'args': str(args), 'ret': ret_val}) elif results: self.logger.info(