kiwi-scp/src/kiwi/subcommands/logs.py

15 lines
402 B
Python
Raw Normal View History

from ..core import Parser
from ._utils import SubCommand, Docker
class LogsCommand(SubCommand):
def __init__(self):
super().__init__(
'logs',
2020-08-10 09:24:39 +00:00
description="Show logs of a project"
)
def run(self):
print(Docker.run_command('docker-compose', ['logs', '-tf', '--tail=10'], cwd='hello-world.project', env={'COMPOSE_PROJECT_NAME': 'hello-world'}))