# File output plugin always outputs json

**URL:** <https://discuss.elastic.co/t/file-output-plugin-always-outputs-json/67630>\
**Category:** Logstash\
**Created:** [November 30, 2016, 2:09pm UTC](https://discuss.elastic.co/t/file-output-plugin-always-outputs-json/67630 "2016-11-30T14:09:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcsaba2](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@gcsaba2](https://discuss.elastic.co/u/gcsaba2)\
**Post date:** [November 30, 2016, 2:09pm UTC](https://discuss.elastic.co/t/file-output-plugin-always-outputs-json/67630/1 "2016-11-30T14:09:45Z")

</div>

I'm reading from a plain text file and want to write the same plain text. So I wrote this:

output {  
file {  
path =\> ....  
codec =\> line { format =\> "%{message}" }  
}  
}

Looks like the file plugin ignores the settings and outputs json. Also if I modify the above pattern to be "blabla %{message}" then the blabla part will never appear.

If I use plain stdout plugin then that works. So the issue is with the file plugin.

I've also tried codec =\> plain, text and other combinations, nothing helped.

Using file output pkugin 2.0.2

---

<div class="post-metadata">

**Author:** ![gcsaba2](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@gcsaba2](https://discuss.elastic.co/u/gcsaba2)\
**Post date:** [November 30, 2016, 3:20pm UTC](https://discuss.elastic.co/t/file-output-plugin-always-outputs-json/67630/2 "2016-11-30T15:20:57Z")

</div>

I solved the issue by moving to logstash 1.5.5 which still supports the message\_format parameter.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 28, 2016, 3:21pm UTC](https://discuss.elastic.co/t/file-output-plugin-always-outputs-json/67630/3 "2016-12-28T15:21:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
