<p>I want to output the kubernetes log to a file.
but, I could only output it as json data.
I want to output only "message" part to file.</p>

<p>How do I choose "message" to print?
Which filter should I choose?</p>

<pre><code>&lt;match output_tag&gt;
  @type rewrite_tag_filter
  &lt;rule&gt;
    key $['kubernetes']['labels']['app']
    pattern ^(.+)$
    tag app.$1
  &lt;/rule&gt;
&lt;/match&gt;
&lt;match app.tom1&gt;
  @type file
  path /logs/tom1
&lt;/match&gt;



Execute result:---&gt;

2019-10-30T00:46:05+09:00   app.tom1    {
..
  "message": "2019-10-29 15:46:05,253 DEBUG [org.springframework.web.servlet.DispatcherServlet] Successfully completed request",
  "kubernetes": {
    "labels": {
      "app": "tom1",
..
}


Desired result: ---&gt;
2019-10-29 15:46:05,253 DEBUG [org.springframework.web.servlet.DispatcherServlet] Successfully completed request
</code></pre>

<p>Thank!</p>

<p>Try the <code>single_value</code> <code>&lt;formater&gt;</code> plugin: <a href="https://docs.fluentd.org/formatter/single_value" rel="nofollow noreferrer">https://docs.fluentd.org/formatter/single_value</a></p>

<pre><code>&lt;match app.tom1&gt;
  @type file
  path /logs/tom1
  &lt;format&gt;
    @type single_value
    message_key message
  &lt;/format&gt;
&lt;/match&gt;
</code></pre>
