summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/config.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-11-01 17:43:50 -0700
committerShentubot <shentubot@google.com>2018-11-01 17:44:58 -0700
commitb6b81fd04ba93db3268ff649c9d23a25c9b89db5 (patch)
tree730c112ed3d8aed5696466672f5c3a2eb16cb9a7 /runsc/boot/config.go
parent9d69d85bc13d4f0956a39951b5cd6777f938cffd (diff)
Add new log format that is compatible with Kubernetes
Fluentd configuration uses 'log' for the log message while containerd uses 'msg'. Since we can't have a single JSON format for both, add another log format and make debug log configurable. PiperOrigin-RevId: 219729658 Change-Id: I2a6afc4034d893ab90bafc63b394c4fb62b2a7a0
Diffstat (limited to 'runsc/boot/config.go')
-rw-r--r--runsc/boot/config.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/runsc/boot/config.go b/runsc/boot/config.go
index 9ebbde424..2d89ad87e 100644
--- a/runsc/boot/config.go
+++ b/runsc/boot/config.go
@@ -157,12 +157,15 @@ type Config struct {
// LogFilename is the filename to log to, if not empty.
LogFilename string
- // LogFormat is the log format, "text" or "json".
+ // LogFormat is the log format.
LogFormat string
// DebugLog is the path to log debug information to, if not empty.
DebugLog string
+ // DebugLogFormat is the log format for debug.
+ DebugLogFormat string
+
// FileAccess indicates how the filesystem is accessed.
FileAccess FileAccessType
@@ -214,6 +217,7 @@ func (c *Config) ToFlags() []string {
"--log=" + c.LogFilename,
"--log-format=" + c.LogFormat,
"--debug-log=" + c.DebugLog,
+ "--debug-log-format=" + c.DebugLogFormat,
"--file-access=" + c.FileAccess.String(),
"--overlay=" + strconv.FormatBool(c.Overlay),
"--network=" + c.Network.String(),