'View output from containers.
Usage: logs [options] [SERVICE...]
Options:
--no-color          Produce monochrome output.
-f, --follow        Follow log output.
-t, --timestamps    Show timestamps.
--tail="all"        Number of lines to show from the end of the logs
for each container.'

def logs(self, options):

    containers = self.project.containers(service_names=options[u'SERVICE'], stopped=True)
    tail = options[u'--tail']
    if (tail is not None):
        if tail.isdigit():
            tail = int(tail)
        elif (tail != u'all'):
            raise UserError(u'tail    flag    must    be    all    or    a    number')
    log_args = {u'follow': options[u'--follow'], u'tail': tail, u'timestamps': options[u'--timestamps']}
    print(u'Attaching    to', list_containers(containers))
    log_printer_from_project(self.project, containers, options[u'--no-color'], log_args, event_stream=self.project.events(service_names=options[u'SERVICE'])).run()
