logspout icon indicating copy to clipboard operation
logspout copied to clipboard

RAW_FORMAT environment variable not working

Open ammar-mop opened this issue 5 years ago • 1 comments

I am trying to route my logs to Amplitude. The Amplitude API requires a JSON string sent, so I have tried formatting the RAW_FORMAT env variable to the appropriate string. However, when I inspect my logs via the --publish option, there seems to be no change in the format, whichever template I set. This eventually leads the logs not being sent to Amplitude.

This is the command that I run:

docker run --name="logspout" --env RAW_FORMAT='{ "api_key" : "MY_API_KEY", "events" : [{{ toJSON .Data }}] }' --volume=/var/run/docker.sock:/var/run/docker.sock --publish=127.0.0.1:8000:80 gliderlabs/logspout raw://api.amplitude.com:443/2/httpapi

ammar-mop avatar May 27 '20 21:05 ammar-mop

It definitely works for the endpoint you send them to when sending e.g. over syslog.

relistan avatar Aug 11 '20 14:08 relistan