osxdocker.DockerLogs

class osxdocker.DockerLogs(debug=False, screen_name='osxdocker', encoding='utf-8', vm_path='~/Library/Containers/com.docker.docker/Data/vms/0/tty')

A module for interacting with docker logs.

Example

>>> from osxdocker.docker_logs import DockerLogs
>>> DockerLogs().log_path('foo')
__init__(debug=False, screen_name='osxdocker', encoding='utf-8', vm_path='~/Library/Containers/com.docker.docker/Data/vms/0/tty')

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([debug, screen_name, encoding, vm_path]) Initialize self.
cat_log(container_name) send log content the log to stdout :param container_name: name of the target container :type container_name: str
clear_log(container_name) Clears the log file without deleting it :param container_name: name of the target container :type container_name: str
log_path(container_name) Gets the path to the logfile in the vm for a container name.
version() Prints the version of osxdocker.
cat_log(container_name)

send log content the log to stdout :param container_name: name of the target container :type container_name: str

clear_log(container_name)

Clears the log file without deleting it :param container_name: name of the target container :type container_name: str

log_path(container_name)

Gets the path to the logfile in the vm for a container name. :param container_name: name of the target container :type container_name: str