Skip to content

Commit

Permalink
Handle default logger correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
towe75 committed May 15, 2021
1 parent f02d0b3 commit 6d93c58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,10 @@ func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drive
createOpts.ContainerBasicConfig.Terminal = driverConfig.Tty

// Logging
if driverConfig.LogDriver == LOG_DRIVER_JOURNALD {
createOpts.LogConfiguration.Driver = "journald"
} else if driverConfig.LogDriver == LOG_DRIVER_NOMAD {
if driverConfig.LogDriver == "" || driverConfig.LogDriver == LOG_DRIVER_NOMAD {
createOpts.ContainerBasicConfig.LogConfiguration.Path = cfg.StdoutPath
} else if driverConfig.LogDriver == LOG_DRIVER_JOURNALD {
createOpts.LogConfiguration.Driver = "journald"
} else {
return nil, nil, fmt.Errorf("Invalid log_driver option")
}
Expand Down

0 comments on commit 6d93c58

Please sign in to comment.