# Split not working in Logstash

**URL:** <https://discuss.elastic.co/t/split-not-working-in-logstash/97580>\
**Category:** Logstash\
**Created:** [August 18, 2017, 12:49pm UTC](https://discuss.elastic.co/t/split-not-working-in-logstash/97580 "2017-08-18T12:49:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivek\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek_sharma/32/46948_2.png) [@Vivek\_Sharma](https://discuss.elastic.co/u/Vivek_Sharma)\
**Post date:** [August 18, 2017, 12:49pm UTC](https://discuss.elastic.co/t/split-not-working-in-logstash/97580/1 "2017-08-18T12:49:19Z")

</div>

Hi

I am trying to split my log by placing below code in logstash configuration file:

> ```
> mutate {
> split => { "log_text" => "|" }
> }
> 
> ```

The log is breaking perfectly with this.

But when I try to break my logs "\n" instead of "|" , the logs are not being broken. Please see below how I have provided it in mutate statement.

> ```
> mutate {
> split => { "log_text" => "\n" }
> }
> 
> ```

My objective is to break the log\_text on every occurrence of "\n" pattern found in my log.

Can anyone please guide me on this.

Thanks

---

<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:** [September 15, 2017, 12:49pm UTC](https://discuss.elastic.co/t/split-not-working-in-logstash/97580/2 "2017-09-15T12:49:31Z")

</div>

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