# HG changeset patch # User Marcin Kuzminski # Date 2017-09-28 20:14:43 # Node ID d1c488ba562de7dd7c959d3b1f93a8b0a21266dc # Parent 5a024fcfafa44309e3155a9a6a5b760cd017bdf8 hooks: added debug logs. diff --git a/rhodecode/lib/hooks_daemon.py b/rhodecode/lib/hooks_daemon.py --- a/rhodecode/lib/hooks_daemon.py +++ b/rhodecode/lib/hooks_daemon.py @@ -109,6 +109,7 @@ class ThreadedHookCallbackDaemon(object) return self def __exit__(self, exc_type, exc_val, exc_tb): + log.debug('Callback daemon exiting now...') self._stop() def _prepare(self): @@ -135,7 +136,7 @@ class HttpHooksCallbackDaemon(ThreadedHo POLL_INTERVAL = 0.1 def _prepare(self): - log.debug("Preparing callback daemon and registering hook object") + log.debug("Preparing HTTP callback daemon and registering hook object") self._done = False self._daemon = TCPServer((self.IP_ADDRESS, 0), HooksHttpHandler) @@ -177,6 +178,7 @@ def prepare_callback_daemon(extras, prot extras['hooks_uri'] = callback_daemon.hooks_uri extras['hooks_protocol'] = protocol + log.debug('Prepared a callback daemon: %s', callback_daemon) return callback_daemon, extras diff --git a/rhodecode/tests/lib/test_hooks_daemon.py b/rhodecode/tests/lib/test_hooks_daemon.py --- a/rhodecode/tests/lib/test_hooks_daemon.py +++ b/rhodecode/tests/lib/test_hooks_daemon.py @@ -181,7 +181,7 @@ class TestHttpHooksCallbackDaemon(object assert_message_in_log( caplog.records, - 'Preparing callback daemon and registering hook object', + 'Preparing HTTP callback daemon and registering hook object', levelno=logging.DEBUG, module='hooks_daemon') def test_prepare_inits_hooks_uri_and_logs_it(