# How to break up long strings without embeded newlines appearing?

**URL:** <https://discuss.elastic.co/t/how-to-break-up-long-strings-without-embeded-newlines-appearing/66288>\
**Category:** Logstash\
**Created:** [November 16, 2016, 6:53pm UTC](https://discuss.elastic.co/t/how-to-break-up-long-strings-without-embeded-newlines-appearing/66288 "2016-11-16T18:53:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gyre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyre/32/13158_2.png) [@gyre](https://discuss.elastic.co/u/gyre)\
**Post date:** [November 16, 2016, 6:53pm UTC](https://discuss.elastic.co/t/how-to-break-up-long-strings-without-embeded-newlines-appearing/66288/1 "2016-11-16T18:53:03Z")

</div>

I have the following snippet of logstash config that contains a long string.

(the actual string is around 200 characters long as it contains a lot of %{blah} references.)

```
output {
    file {
        path => "/tmp/foo.txt"
        codec => line {
            format => "a really long string that would be nicer if broken up into smaller bits"
        }
    }
}

```

I'd like to break this string across multiple lines for readability, but simply putting a backslash at the end of each line doesn't seem to work as this causes multiple lines in the output.

Any suggestions are very welcome.

Thanks.

-- ange --

---

<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 14, 2016, 6:53pm UTC](https://discuss.elastic.co/t/how-to-break-up-long-strings-without-embeded-newlines-appearing/66288/2 "2016-12-14T18:53:43Z")

</div>

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