Merge pull request #3239 from sipsma/nosetuplog
Support disabling default setup of shim logger.
This commit is contained in:
commit
810b3c37bb
@ -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,8 +208,10 @@ func run(id string, initFunc Init, config Config) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
default:
|
default:
|
||||||
if err := setLogger(ctx, idFlag); err != nil {
|
if !config.NoSetupLogger {
|
||||||
return err
|
if err := setLogger(ctx, idFlag); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
client := NewShimClient(ctx, service, signals)
|
client := NewShimClient(ctx, service, signals)
|
||||||
if err := client.Serve(); err != nil {
|
if err := client.Serve(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user