Add -t, --timestamps flag as option on logs.

Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
This commit is contained in:
Stéphane Seguin 2016-02-28 22:00:12 +01:00
commit d9b4286f91
4 changed files with 28 additions and 11 deletions

View file

@ -328,15 +328,17 @@ class TopLevelCommand(DocoptCommand):
Usage: logs [options] [SERVICE...]
Options:
--no-color Produce monochrome output.
-f, --follow Follow log output
--no-color Produce monochrome output.
-f, --follow Follow log output
-t, --timestamps Show timestamps
"""
containers = project.containers(service_names=options['SERVICE'], stopped=True)
monochrome = options['--no-color']
follow = options['--follow']
timestamps = options['--timestamps']
print("Attaching to", list_containers(containers))
LogPrinter(containers, monochrome=monochrome, follow=follow).run()
LogPrinter(containers, monochrome=monochrome, follow=follow, timestamps=timestamps).run()
def pause(self, project, options):
"""