# Filebeat concats multile line with \`\\n\\t\`

**URL:** <https://discuss.elastic.co/t/filebeat-concats-multile-line-with-n-t/355021>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 8, 2024, 10:35am UTC](https://discuss.elastic.co/t/filebeat-concats-multile-line-with-n-t/355021 "2024-03-08T10:35:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![puppylpg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/puppylpg/32/108184_2.png) [@puppylpg](https://discuss.elastic.co/u/puppylpg)\
**Post date:** [March 8, 2024, 10:35am UTC](https://discuss.elastic.co/t/filebeat-concats-multile-line-with-n-t/355021/1 "2024-03-08T10:35:22Z")

</div>

I'm using filebeat to collect logs from a java service into ELK stack. As we all know the java stacktrace are multilines so i config the filebeat stated [here](https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html)：

```yaml
  multiline:
    pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}.*'
    negate: true
    match: after

```

The stacktrace are combined together successfully, however I don't know why the lines are concated by `\n\t` which makes the final message hard to read, like this:

```auto
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement$2.executeSQL(ShardingSpherePreparedStatement.java:412)\n\tat org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement$2.executeSQL(ShardingSpherePreparedStatement.java:408)\n\tat org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:85)\n\tat org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:64)\n\tat org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.syncExecute(ExecutorEngine.java:101)\n\tat org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.parallelExecute(ExecutorEngine.java:97)\n\tat org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.execute(ExecutorEngine.java:82)\n\tat org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:65)\n\tat org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:49)\n\tat org.apache.shardingsphere.driver.executor.DriverJDBCExecutor.doExecute(DriverJDBCExecutor.java:153)\n\tat org.apache.shardingsphere.driver.executor.DriverJDBCExecutor.execute(DriverJDBCExecutor.java:142)\n\tat 

```

This is the raw console output of filebeat.

I'm expecting the log texts are shown as original format(real new line, rather that `\n`):

```auto
        at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:64)
        at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.syncExecute(ExecutorEngine.java:101)
        at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.parallelExecute(ExecutorEngine.java:97)
        at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.execute(ExecutorEngine.java:82)
        at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:65)
        at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:49)
        at org.apache.shardingsphere.driver.executor.DriverJDBCExecutor.doExecute(DriverJDBCExecutor.java:153)

```

Any suggestions for the problem? Thanks in advanced.

---

<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:** [April 5, 2024, 12:35pm UTC](https://discuss.elastic.co/t/filebeat-concats-multile-line-with-n-t/355021/2 "2024-04-05T12:35:35Z")

</div>

Closed on April 5, 2024, 12:35pm UTC

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