Skip to content

Commit

Permalink
Fixed a bug when giving in another logging driver than syslog.
Browse files Browse the repository at this point in the history
Before this commit, if the Logging config did not contain a logging option "syslog-address", it would definitely insert this option.
If then, you decide to take another logdriver than syslog, docker would fail because it received a wrong log option for the selected driver.
Now, nomad will only insert the syslog address in a hard way if there are no logging options at all - this way it keeps the default nomad settings.
  • Loading branch information
Jan-Hendrik Lendholt authored and Jan-Hendrik Lendholt committed Sep 22, 2016
1 parent 35d1ef1 commit af85613
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,6 @@ func (d *DockerDriver) createContainer(ctx *ExecContext, task *structs.Task,
d.logger.Printf("[DEBUG] driver.docker: Setting default logging options to syslog and %s", syslogAddr)
if driverConfig.Logging[0].Type == "" {
driverConfig.Logging[0].Type = "syslog"
}

if driverConfig.Logging[0].Config["syslog-address"] == "" {
driverConfig.Logging[0].Config["syslog-address"] = syslogAddr
}
}
Expand Down

0 comments on commit af85613

Please sign in to comment.