From 8ed7dfef6fb8d3f6eeeb4c515315e9ae43baee29 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Mon, 8 Jun 2015 12:48:46 -0400 Subject: [PATCH] Merge pull request #1525 from aanand/fix-duplicate-logging Fix duplicate logging on up/run (cherry picked from commit e2b790f7328482591863e496de14c825fd3f8a23) Signed-off-by: Aanand Prasad --- compose/cli/main.py | 1 + compose/service.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compose/cli/main.py b/compose/cli/main.py index 61f3ec3f9..fa4013161 100644 --- a/compose/cli/main.py +++ b/compose/cli/main.py @@ -335,6 +335,7 @@ class TopLevelCommand(Command): container_options['ports'] = [] container = service.create_container( + quiet=True, one_off=True, insecure_registry=insecure_registry, **container_options diff --git a/compose/service.py b/compose/service.py index ccfb38511..dd931beee 100644 --- a/compose/service.py +++ b/compose/service.py @@ -199,6 +199,7 @@ class Service(object): do_build=True, previous_container=None, number=None, + quiet=False, **override_options): """ Create a container for this service. If the image doesn't exist, attempt to pull @@ -216,7 +217,7 @@ class Service(object): previous_container=previous_container, ) - if 'name' in container_options: + if 'name' in container_options and not quiet: log.info("Creating %s..." % container_options['name']) return Container.create(self.client, **container_options) @@ -378,6 +379,7 @@ class Service(object): do_build=False, previous_container=container, number=container.labels.get(LABEL_CONTAINER_NUMBER), + quiet=True, ) self.start_container(new_container) container.remove()