It’s quite easy to set this using the current tool. The tool will calculate a container to spin up, show the commands to run, and if requested, run them!
- To see the command, run
current setup-docker -n <stream name>
- To see the run the command, run
current setup-docker -n <stream name> -e
This downloads an image from docker hub with all the proper code bits and starts up a container to manage the reading and sending of log data.
To stop sending logs, simply kill the container with
There are a few knobs to control which containers are logged. There are 4 mechanisms to use to control this:
- TTY: Any container that is using a TTY is not logged, for obvious reasons
- Labels: Any container with the docker label
logging.ignoredefined will not have its output logged.
- LOGGING variable: Any container with the environment variable
ignorewill not have its output logged.
- LOGSPOUT variable: Any container with the environment variable
ignorewill not have its output logged. This option is provided for users of the logspout tool to easily use current.sh logging as well.
- Container name: The name of the container defined by docker is provided under the
- Container ID: The container id defined by docker is provided under the
- Kubernetes Pod: If the docker container is running a kubernetes pod, the pod name is provided under the
- Kubernetes Namespace: If the docker container is running a kubernetes pod, the kubernetes namespace is proveded under the