add logging
This commit is contained in:
parent
1f8ccbabb0
commit
ae3a6b04fd
3
start.py
3
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)
|
||||
|
Loading…
Reference in New Issue
Block a user