What is the problem you're trying to solve
Currently containerd uses supports text format for logs.
For example for /var/log/containers/coredns-*, the text log output would typically be in the format:
2020-01-10T18:10:40.01576219Z stdout F [INFO] plugin/reload: Running configuration MD5 = 4665410bf21c8b272fcfd562c482cb82
Describe the solution you'd like
I'd like the ability to configure containerd to write container logs using JSON format instead.
Re-using the example above of /var/log/containers/coredns-*, the JSON log format would be:
{"log":"[INFO] plugin/reload: Running configuration MD5 = 4665410bf21c8b272fcfd562c482cb82\n","stream":"stdout","time":"2020-01-10T17:22:50.838559221Z"}
Ideally, I'd like to use the configuration file at /etc/containerd/config.toml to switch between Text and JSON format for logs.
Additional context
This is for easy parsing by 3PP tools such as Elasticsearch and Splunk.
What is the problem you're trying to solve
Currently containerd uses supports text format for logs.
For example for
/var/log/containers/coredns-*, the text log output would typically be in the format:2020-01-10T18:10:40.01576219Z stdout F [INFO] plugin/reload: Running configuration MD5 = 4665410bf21c8b272fcfd562c482cb82Describe the solution you'd like
I'd like the ability to configure containerd to write container logs using JSON format instead.
Re-using the example above of
/var/log/containers/coredns-*, the JSON log format would be:{"log":"[INFO] plugin/reload: Running configuration MD5 = 4665410bf21c8b272fcfd562c482cb82\n","stream":"stdout","time":"2020-01-10T17:22:50.838559221Z"}Ideally, I'd like to use the configuration file at
/etc/containerd/config.tomlto switch between Text and JSON format for logs.Additional context
This is for easy parsing by 3PP tools such as Elasticsearch and Splunk.