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 NoSubreaper bool
// NoReaper disables the shim binary from reaping any child process implicitly // NoReaper disables the shim binary from reaping any child process implicitly
NoReaper bool NoReaper bool
// NoSetupLogger disables automatic configuration of logrus to use the shim FIFO
NoSetupLogger bool
} }
var ( var (
@ -206,9 +208,11 @@ func run(id string, initFunc Init, config Config) error {
} }
return nil return nil
default: default:
if !config.NoSetupLogger {
if err := setLogger(ctx, idFlag); err != nil { if err := setLogger(ctx, idFlag); err != nil {
return err return err
} }
}
client := NewShimClient(ctx, service, signals) client := NewShimClient(ctx, service, signals)
if err := client.Serve(); err != nil { if err := client.Serve(); err != nil {
if err != context.Canceled { if err != context.Canceled {