logspout icon indicating copy to clipboard operation
logspout copied to clipboard

MARATHON_APP_ID in log message

Open michallula opened this issue 9 years ago • 4 comments

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?

michallula avatar Nov 03 '15 15:11 michallula

+1 @progrium if you have any idea

scalp42 avatar Nov 24 '15 22:11 scalp42

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

orimarti avatar Feb 04 '16 16:02 orimarti

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í [email protected] 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

progrium avatar Feb 11 '16 18:02 progrium

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 ?

vivekjuneja avatar Oct 06 '16 02:10 vivekjuneja