tutor icon indicating copy to clipboard operation
tutor copied to clipboard

Add --quiet or --silent option to tutor

Open cacciaresi opened this issue 7 years ago • 7 comments

Is your feature request related to a problem? Please describe. Not a problem at all ;) It would be good to have an option to silent the output of tutor related with docker-compose.

Describe the solution you'd like I'd like to have an option (maybe --quiet, --silent, -s) to silent status of containers.

Additional context In our specific case we are running command in a cronjob and the logs are filled with this kind of messages.

See: https://github.com/docker/compose/issues/3447

cacciaresi avatar Nov 25 '19 15:11 cacciaresi

To clarify: the goal is to get rid of the "starting ..." messages.

regisb avatar Nov 25 '19 17:11 regisb

Correct ;)

cacciaresi avatar Nov 25 '19 17:11 cacciaresi

@cacciaresi It occurred to me that you could obtain the same result by running tutor local start -d > /dev/null. Right? Would that be a satisfactory solution?

regisb avatar Nov 27 '19 09:11 regisb

When I run it like that, I still see all the messages related with each container status.

(tutor) root@open-edx:~# tutor local start -d > /dev/null
Starting tutorlocal_discovery-assets_1 ... 
tutorlocal_memcached_1 is up-to-date
tutorlocal_mongodb_1 is up-to-date
tutorlocal_mysql_1 is up-to-date
tutorlocal_elasticsearch_1 is up-to-date
tutorlocal_smtp_1 is up-to-date
Starting tutorlocal_ecommerce-assets_1 ... 
tutorlocal_rabbitmq_1 is up-to-date
Starting tutorlocal_openedx-assets_1 ... 
tutorlocal_forum_1 is up-to-date
tutorlocal_cms_1 is up-to-date
tutorlocal_lms_1 is up-to-date
tutorlocal_cms_worker_1 is up-to-date
tutorlocal_nginx_1 is up-to-date
tutorlocal_lms_worker_1 is up-to-date
tutorlocal_discovery_1 is up-to-date
tutorlocal_ecommerce_1 is up-to-date
Starting tutorlocal_ecommerce-assets_1 ... done

cacciaresi avatar Nov 27 '19 14:11 cacciaresi

Right. It appears that we can silence the docker-compose command by running:

tutor local start -d > /dev/null 2>&1

But this is not a satisfactory solution, as it swallows actual error messages. We'll figure out something better.

regisb avatar Dec 05 '19 10:12 regisb

This will be addressed by PR #275 once docker/compose#6026 gets fixed.

regisb avatar Dec 05 '19 10:12 regisb

There has been no activity upstream for a long time. I'll close this for now. Please re-open when the folks at docker-compose do something about it.

regisb avatar May 31 '21 12:05 regisb