# Multiline hybris stacktrace with different dates

**URL:** <https://discuss.elastic.co/t/multiline-hybris-stacktrace-with-different-dates/88730>\
**Category:** Logstash\
**Created:** [June 8, 2017, 3:17pm UTC](https://discuss.elastic.co/t/multiline-hybris-stacktrace-with-different-dates/88730 "2017-06-08T15:17:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aleksandr\_Matveyev](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@Aleksandr\_Matveyev](https://discuss.elastic.co/u/Aleksandr_Matveyev)\
**Post date:** [June 8, 2017, 3:17pm UTC](https://discuss.elastic.co/t/multiline-hybris-stacktrace-with-different-dates/88730/1 "2017-06-08T15:17:51Z")

</div>

Hello everybody,  
I have very bad issue. I need to parse a log such as:  
`INFO | jvm 1 | main | 2015/04/11 17:25:58.569 | java.lang.NullPointerException INFO | jvm 1 | main | 2015/04/11 17:25:58.569 | at de.hybris.platform.commercefacades.product.converters.populator.ProductFeatureListPopulator.buildClassificationDataList(ProductFeatureListPopulator.java:78) INFO | jvm 1 | main | 2015/04/11 17:25:58.569 | at de.hybris.platform.commercefacades.product.converters.populator.ProductFeatureListPopulator.populate(ProductFeatureListPopulator.java:65) INFO | jvm 1 | main | 2015/04/11 17:25:58.569 | java.lang.NullPointerException INFO | jvm 1 | main | 2015/04/11 17:25:58.569 | at de.hybris.platform.commercefacades.product.converters.populator.ProductFeatureListPopulator.buildClassificationDataList(ProductFeatureListPopulator.java:78) INFO | jvm 1 | main | 2015/04/11 17:25:58.569 | at de.hybris.platform.commercefacades.product.converters.populator.ProductFeatureListPopulator.populate(ProductFeatureListPopulator.java:65) INFO | jvm 1 | main | 2015/04/11 17:25:58.571 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.doFilterInternal(AbstractPlatformFilterChain.java:155) INFO | jvm 1 | main | 2015/04/11 17:25:58.571 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)`

As you see, this log have already had different dates. I want to get this log message as multiline:  
`java.lang.NullPointerException at de.hybris.platform.commercefacades.product.converters.populator.ProductFeatureListPopulator.buildClassificationDataList(ProductFeatureListPopulator.java:78) at de.hybris.platform.commercefacades.product.converters.populator.ProductFeatureListPopulator.populate(ProductFeatureListPopulator.java:65)`  
...  
with only first date. But I can't( Here is my pipeline:  
`input  
{  
file {  
path =\> "/usr/stack.log"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
}  
}  
filter {  
grok {  
match =\> { "message" =\> "(?:(?:._?|)){3}(?\<datetime\_string\>._?)|(?\<l\_message\>._)$" }  
}  
mutate {  
gsub =\> ["l\_message","(\t)",""]  
}  
mutate {  
gsub =\> ["l\_message", "[\e]", "\_"]  
}  
multiline {  
pattern =\> "([a-zA-Z.]+(?:Exception).+)|(\s+at .+)|(\t+at .+)|(\s+... \d+ more)|(\s_Caused by:.+)"  
what =\> "previous"  
}  
mutate {  
strip =\> "datetime\_string"  
}  
if "multiline" in [tags] {  
mutate {  
update =\> { "datetime\_string" =\> "%{[datetime\_string][0]}" }  
}  
}

```
    date {
            match => ["datetime_string" , "yyyy/MM/dd HH:mm:ss.SSS"]
            timezone => "Etc/GMT"
    }
    mutate {
            remove_field => ["file"]
            remove_field => ["offset"]
            remove_field => ["message"]
            remove_field => ["datetime_string"]
    }

```

}  
output  
{  
stdout {  
codec =\> rubydebug  
}  
}`

---

<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:** [July 6, 2017, 3:17pm UTC](https://discuss.elastic.co/t/multiline-hybris-stacktrace-with-different-dates/88730/2 "2017-07-06T15:17:53Z")

</div>

Closed on July 6, 2017, 3:17pm UTC

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