summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2019-07-26 16:52:28 -0700
committergVisor bot <gvisor-bot@google.com>2019-07-26 16:53:54 -0700
commit4183b9021ac1d055085dc1fd2f525689fc055d78 (patch)
tree5761a1593baccf738ad7e8dd72b6173dec6974b6 /runsc/boot
parent2762692621aec8b3d1e1839c2dc18965a4af0a18 (diff)
runsc: propagate the alsologtostderr to sub-commands
PiperOrigin-RevId: 260239119
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/config.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/runsc/boot/config.go b/runsc/boot/config.go
index 6f1eb9a41..7ae0dd05d 100644
--- a/runsc/boot/config.go
+++ b/runsc/boot/config.go
@@ -198,6 +198,9 @@ type Config struct {
// sandbox and Gofer process run as root inside a user namespace with root
// mapped to the caller's user.
Rootless bool
+
+ // AlsoLogToStderr allows to send log messages to stderr.
+ AlsoLogToStderr bool
}
// ToFlags returns a slice of flags that correspond to the given Config.
@@ -223,6 +226,7 @@ func (c *Config) ToFlags() []string {
"--net-raw=" + strconv.FormatBool(c.EnableRaw),
"--num-network-channels=" + strconv.Itoa(c.NumNetworkChannels),
"--rootless=" + strconv.FormatBool(c.Rootless),
+ "--alsologtostderr=" + strconv.FormatBool(c.AlsoLogToStderr),
}
if c.TestOnlyAllowRunAsCurrentUserWithoutChroot {
// Only include if set since it is never to be used by users.