ContainerSolutions / minimesos

The experimentation and testing tool for Apache Mesos - NO LONGER MAINTANED!
https://www.minimesos.org
Apache License 2.0
428 stars 61 forks source link

Add "minimesos logs" command #191

Open frankscholten opened 8 years ago

frankscholten commented 8 years ago

Checking executor logs is time consuming because we have to determine the slave, enter the docker container, find the correct file and then read it.

Imagine we have launched Kafka and it keeps failing and restarting. We have a bunch FAILED tasks and log directories in the sandbox. The tasks have IDs look like this:

kafka-mesos-scheduler.708e9047-b73c-11e5-a399-0242ac110005

where the part after the dot keeps changing for every new task.

Let's add a minimesos logs command that accepts part of a task ID like this:

$ minimesos logs kafka-mesos
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0110 01:47:18.050611 25438 process.cpp:995] libprocess is initialized on 172.17.0.6:41803 for 8 cpus
I0110 01:47:18.051002 25438 logging.cpp:172] INFO level logging started!
I0110 01:47:18.051314 25438 logging.cpp:177] Logging to /var/log
I0110 01:47:18.052146 25438 exec.cpp:134] Version: 0.25.0
I0110 01:47:18.053340 25441 exec.cpp:184] Executor started at: executor(1)@172.17.0.6:41803 with pid 25438
--- Snip ---

Perhaps it should log stdout by default and stderr when adding a --stderr flag or vice versa.

riccardomc commented 6 years ago

Hello! I implemented this in pull request https://github.com/ContainerSolutions/minimesos/pull/544. Please let me know what do you think! :blush: