Microsoft Application Insights Docker Logging Plugin
This project implements a Docker logging driver that will allow Docker to stream logs to local JSON files and Microsoft Application Insights.
This log plugin supports the docker logs
command.
Installation
docker plugin install --alias appinsights michaelgolfi/appinsights
Usage
docker run -d --name "example-logger" \
--log-driver appinsights \
--log-opt token=$AppInsightsToken \
ubuntu bash -c 'while true; do echo "{\"msg\": \"something\", \"time\": \"`date +%s`\"}"; sleep 2; done;'
Log Options
Building
This plugin uses godep for vendoring.
- Run
make install
to install all dependencies.
- Run
./scripts/build.sh
to build the plugin.
References
JSON File Logging Driver
Documentation: https://docs.docker.com/engine/admin/logging/json-file/#options