Fix log destination in one-shot mode (#2084)
This commit is contained in:
parent
83db873f5b
commit
a6bb2cf5e1
2
.github/buildkit.toml
vendored
2
.github/buildkit.toml
vendored
|
@ -1,2 +1,2 @@
|
||||||
[worker.oci]
|
[worker.oci]
|
||||||
max-parallelism = 2
|
# max-parallelism = 2
|
||||||
|
|
|
@ -211,6 +211,11 @@ func LoadConfig(cConfig *csconfig.Config) error {
|
||||||
return err
|
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
|
// Configure logging
|
||||||
if err := types.SetDefaultLoggerConfig(cConfig.Common.LogMedia,
|
if err := types.SetDefaultLoggerConfig(cConfig.Common.LogMedia,
|
||||||
cConfig.Common.LogDir, *cConfig.Common.LogLevel,
|
cConfig.Common.LogDir, *cConfig.Common.LogLevel,
|
||||||
|
@ -264,7 +269,6 @@ func LoadConfig(cConfig *csconfig.Config) error {
|
||||||
if flags.DisableAPI {
|
if flags.DisableAPI {
|
||||||
cConfig.Common.Daemonize = false
|
cConfig.Common.Daemonize = false
|
||||||
}
|
}
|
||||||
cConfig.Common.LogMedia = "stdout"
|
|
||||||
log.Infof("single file mode : log_media=%s daemonize=%t", cConfig.Common.LogMedia, cConfig.Common.Daemonize)
|
log.Infof("single file mode : log_media=%s daemonize=%t", cConfig.Common.LogMedia, cConfig.Common.Daemonize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue