From 59b2b2cb045f417348ed8d1fee032050efcff924 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sat, 12 Nov 2016 09:26:40 +0900 Subject: [PATCH] Better log formatting --- server/daemon.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/daemon.py b/server/daemon.py index b85f8fe..1dae4cd 100644 --- a/server/daemon.py +++ b/server/daemon.py @@ -58,7 +58,7 @@ class Daemon(util.LoggedClass): if msg != self.prior_msg or self.skip_count == 0: self.skip_count = 10 self.prior_msg = msg - self.logger.error('{}. Retrying between sleeps...' + self.logger.error('{} Retrying between sleeps...' .format(msg)) self.skip_count -= 1 @@ -73,19 +73,19 @@ class Daemon(util.LoggedClass): self.logger.info('connection restored') return result except asyncio.TimeoutError: - log_error('timeout error', skip_once=True) + log_error('timeout error.', skip_once=True) except aiohttp.ClientHttpProcessingError: - log_error('HTTP error', skip_once=True) + log_error('HTTP error.', skip_once=True) except aiohttp.ServerDisconnectedError: - log_error('disconnected', skip_once=True) + log_error('disconnected.', skip_once=True) except aiohttp.ClientConnectionError: log_error('connection problem - is your daemon running?') except self.DaemonWarmingUpError: - log_error('still starting up checking blocks...') + log_error('still starting up checking blocks.') except (asyncio.CancelledError, DaemonError): raise except Exception as e: - log_error('request gave unexpected error: {}'.format(e)) + log_error('request gave unexpected error: {}.'.format(e)) await asyncio.sleep(secs) secs = min(16, secs * 2)