gliderlabs / logspout

Log routing for Docker container logs
MIT License
4.66k stars 681 forks source link

MARATHON_APP_ID in log message #137

Open michallula opened 9 years ago

michallula commented 9 years ago

Hi, I wonder what is the best way to customize logs messages and to include additional information about Docker container from environment variables. I'm working on PaaS solution using Apache Mesos and Marathon. Marathon tasks launch Docker containers and set MARATHON_APP_ID variable which is human readable name of container. It can be retrieved with docker inspect command. I want to include this information in each log message. Is it possible with logspout?

scalp42 commented 9 years ago

+1 @progrium if you have any idea

orimarti commented 8 years ago

Would be good being able to log some environment variables :)

progrium commented 8 years ago

The templating you have has access to the entire Docker container structure as far as I know. It should be possible.

On Thu, Feb 4, 2016 at 10:36 AM, Oriol Martí notifications@github.com wrote:

Would be good being able to log some environment variables :)

— Reply to this email directly or view it on GitHub https://github.com/gliderlabs/logspout/issues/137#issuecomment-179934465 .

Jeff Lindsay http://progrium.com

vivekjuneja commented 8 years ago

We are already using this in Production cluster. We use the Logstash adapter, and have @modified it to access useful environment variables set in the docker container.

@michallula - Do you still have this issue ?