From ae3a6b04fdc5e270f9e3b256f90894534114730b Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Tue, 2 Jun 2020 19:07:23 +0200 Subject: [PATCH] add logging --- start.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/start.py b/start.py index 3d3adfb..7ad5236 100644 --- a/start.py +++ b/start.py @@ -222,10 +222,13 @@ if __name__ == '__main__': for line in client.events(): line_str = line.decode("utf-8") event = json.loads(line_str) + logging.info('Event: %s', json.dumps(event)) if event['Action'] in ['create']: # check if there is any domain name configured container_id = event['id'] + logging.info('Create container id: %s', container_id) + if len(list_domains.handle_container(client, container_id)) > 0: resolved_domains = list_domains.get_resolving_domains_from_containers(client) resolved_domains = sorted(resolved_domains)