Skip to content

Commit

Permalink
Merge pull request containerd#3239 from sipsma/nosetuplog
Browse files Browse the repository at this point in the history
Support disabling default setup of shim logger.
  • Loading branch information
estesp authored Apr 25, 2019
2 parents 2d780a7 + 48f4651 commit 810b3c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions runtime/v2/shim/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 810b3c3

Please sign in to comment.