Fix log destination in one-shot mode (#2084)
This commit is contained in:
parent
83db873f5b
commit
a6bb2cf5e1
2 changed files with 6 additions and 2 deletions
2
.github/buildkit.toml
vendored
2
.github/buildkit.toml
vendored
|
@ -1,2 +1,2 @@
|
|||
[worker.oci]
|
||||
max-parallelism = 2
|
||||
# max-parallelism = 2
|
||||
|
|
|
@ -211,6 +211,11 @@ func LoadConfig(cConfig *csconfig.Config) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if flags.SingleFileType != "" && flags.OneShotDSN != "" {
|
||||
// if we're in time-machine mode, we don't want to log to file
|
||||
cConfig.Common.LogMedia = "stdout"
|
||||
}
|
||||
|
||||
// Configure logging
|
||||
if err := types.SetDefaultLoggerConfig(cConfig.Common.LogMedia,
|
||||
cConfig.Common.LogDir, *cConfig.Common.LogLevel,
|
||||
|
@ -264,7 +269,6 @@ func LoadConfig(cConfig *csconfig.Config) error {
|
|||
if flags.DisableAPI {
|
||||
cConfig.Common.Daemonize = false
|
||||
}
|
||||
cConfig.Common.LogMedia = "stdout"
|
||||
log.Infof("single file mode : log_media=%s daemonize=%t", cConfig.Common.LogMedia, cConfig.Common.Daemonize)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue