Merge pull request #3239 from sipsma/nosetuplog

Support disabling default setup of shim logger.
This commit is contained in:
Phil Estes 2019-04-25 17:48:11 -04:00 committed by GitHub
commit 810b3c37bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,8 @@ type Config struct {
NoSubreaper bool
// NoReaper disables the shim binary from reaping any child process implicitly
NoReaper bool
// NoSetupLogger disables automatic configuration of logrus to use the shim FIFO
NoSetupLogger bool
}
var (
@ -206,8 +208,10 @@ func run(id string, initFunc Init, config Config) error {
}
return nil
default:
if err := setLogger(ctx, idFlag); err != nil {
return err
if !config.NoSetupLogger {
if err := setLogger(ctx, idFlag); err != nil {
return err
}
}
client := NewShimClient(ctx, service, signals)
if err := client.Serve(); err != nil {