Use a logging driver plugin (original) (raw)

Docker logging plugins allow you to extend and customize Docker's logging capabilities beyond those of thebuilt-in logging drivers. A logging service provider canimplement their own plugins and make them available on Docker Hub, or a private registry. This topic shows how a user of that logging service can configure Docker to use the plugin.

To install a logging driver plugin, use docker plugin install <org/image>, using the information provided by the plugin developer.

You can list all installed plugins using docker plugin ls, and you can inspect a specific plugin using docker inspect.

When the plugin is installed, you can configure the Docker daemon to use it as the default by setting the plugin's name as the value of the log-driverkey in the daemon.json, as detailed in thelogging overview. If the logging driver supports additional options, you can set those as the values of the log-opts array in the same file.

After the plugin is installed, you can configure a container to use the plugin as its logging driver by specifying the --log-driver flag to docker run, as detailed in thelogging overview. If the logging driver supports additional options, you can specify them using one or more --log-opt flags with the option name as the key and the option value as the value.