# Stacktrace logged by several lines in kibana

**URL:** <https://discuss.elastic.co/t/stacktrace-logged-by-several-lines-in-kibana/337539>\
**Category:** Kibana\
**Created:** [July 4, 2023, 9:17am UTC](https://discuss.elastic.co/t/stacktrace-logged-by-several-lines-in-kibana/337539 "2023-07-04T09:17:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANARAN](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@ANARAN](https://discuss.elastic.co/u/ANARAN)\
**Post date:** [July 4, 2023, 9:17am UTC](https://discuss.elastic.co/t/stacktrace-logged-by-several-lines-in-kibana/337539/1 "2023-07-04T09:17:25Z")

</div>

Hello,

I'm trying to improve the display of stacktraces for an application I'm working on.

Now, the stacktrace look like this :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/3/43258cd956382f885d4b9493e55878c8feadd2a8.png)

I work with log4j (I know, it's deprecated) and logstash, but not filebeat.

How can I improve the display of the log in an only message ?

Here is a sample of my portal-log4-ext.xml :

```auto
<appender name="SocketAppender" class="org.apache.log4j.net.SocketAppender">
        <param name="Port" value="6812"/>
        <param name="RemoteHost" value="localhost"/>
        <param name="ReconnectionDelay" value="1000" />
        <param name="Application" value="censured"/>
    </appender>
    <appender name="AsyncAppender" class="org.apache.log4j.AsyncAppender">
        <param name="Blocking" value="false"/>
        <param name="BufferSize" value="1024"/>
        <appender-ref ref="SocketAppender"/>
    </appender>

```

thanks by advance for your replies.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [July 5, 2023, 3:16pm UTC](https://discuss.elastic.co/t/stacktrace-logged-by-several-lines-in-kibana/337539/2 "2023-07-05T15:16:10Z")

</div>

Hi @ANARAN,

Welcome to the community! Can you explain what you mean by improve the display of your log messages? Can you give us an example of the output you want to see?

---

<div class="post-metadata">

**Author:** ![ANARAN](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@ANARAN](https://discuss.elastic.co/u/ANARAN)\
**Post date:** [July 5, 2023, 3:38pm UTC](https://discuss.elastic.co/t/stacktrace-logged-by-several-lines-in-kibana/337539/3 "2023-07-05T15:38:20Z")

</div>

Hello,

I can't give another sample. I'm afraid to reveal information about my company.

I can discribe what I'd like to get :

Instead of seeing the whole stacktrace cut by several lines in kibana, I would like to get an only message for the message.  
This message will start with the error message (like in the image I gave : "com.liferay.portal.kernel.security.auth.AuthException").  
Then you can see in kibana you could deploy the message caracteristics and display details about the message. There you could see the whole stacktrace.

I saw it in another project, but I can't find an example with log4j 1 . Do you have any clue ?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [July 5, 2023, 3:59pm UTC](https://discuss.elastic.co/t/stacktrace-logged-by-several-lines-in-kibana/337539/4 "2023-07-05T15:59:45Z")

</div>

If you are sending this to Logstash you need to have a multiline codec in your input.

Check the [documentation](https://www.elastic.co/guide/en/logstash/current/plugins-codecs-multiline.html#plugins-codecs-multiline) for some examples.

You need to solve this in Logstash, before sending the data to Elasticsearch, and for multiline logs like that one you need to use the multiline codec.

But without any sample of your data is pretty hard to help further with working examples.

---

<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:** [August 2, 2023, 4:00pm UTC](https://discuss.elastic.co/t/stacktrace-logged-by-several-lines-in-kibana/337539/5 "2023-08-02T16:00:03Z")

</div>

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