Merge "simple log information"

This commit is contained in:
Jenkins 2016-09-08 10:25:46 +00:00 committed by Gerrit Code Review
commit 1e0539c6ed

View File

@ -201,12 +201,9 @@ class ObjectReplicator(Daemon):
if self.rsync_error_log_line_length: if self.rsync_error_log_line_length:
error_line = error_line[:self.rsync_error_log_line_length] error_line = error_line[:self.rsync_error_log_line_length]
self.logger.error(error_line) self.logger.error(error_line)
elif results:
self.logger.info(
_("Successful rsync of %(src)s at %(dst)s (%(time).03f)"),
{'src': args[-2], 'dst': args[-1], 'time': total_time})
else: else:
self.logger.debug( log_method = self.logger.info if results else self.logger.debug
log_method(
_("Successful rsync of %(src)s at %(dst)s (%(time).03f)"), _("Successful rsync of %(src)s at %(dst)s (%(time).03f)"),
{'src': args[-2], 'dst': args[-1], 'time': total_time}) {'src': args[-2], 'dst': args[-1], 'time': total_time})
return ret_val return ret_val