Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a .Env function on syslog messages #100

Closed
wants to merge 1 commit into from

Conversation

dfuentes
Copy link

I know the usual method to do changes like this is rolling a custom logspout container with our modified syslog adapter module, but I thought this change might be generally useful.

We've run into the issue where we want to add some container specific information to our log lines, but don't have control of either the container hostname or container name (we are on mesos/marathon). Allowing using container environment variables in the syslog configuration templates (i.e. SYSLOG_TAG) allows us to pull in this custom info.

@dfuentes dfuentes force-pushed the add-env-template-option branch from 4f39700 to 8378e4d Compare May 11, 2015 18:49
@ejholmes
Copy link

👍 👍 this would be really handy.

@sebest
Copy link

sebest commented Sep 25, 2015

Any feedback on adding this feature? Would be really useful on ECS, thanx

@sebest
Copy link

sebest commented Sep 25, 2015

I found a solution using labels on ECS and the SYSLOG_TAG environment variable of logspout:

SYSLOG_TAG="{{ index .Container.Config.Labels "com.amazonaws.ecs.container-name" }}"

@Carles-Figuerola
Copy link

Look at #182, it should solve this problem and can be changed at runtime to the desired .Env key you want

- This allows you to use docker container environment variables in the
  templates for things like SYSLOG_TAG
@dfuentes dfuentes force-pushed the add-env-template-option branch from 8378e4d to 173058a Compare July 12, 2016 19:21
@dfuentes
Copy link
Author

dfuentes commented Aug 7, 2017

Closing this, it's pretty old at this point, and I no longer use logspout

@dfuentes dfuentes closed this Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants