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)

Returns the content of the log.

clear_log(container_name)

Clears the log file without deleting it.

log_path(container_name)

Returns the path to the log on the docker vm.

version()

Prints the version of osxdocker.