# Logstash filter for a log record from filebeats

**URL:** https://discuss.elastic.co/t/logstash-filter-for-a-log-record-from-filebeats/282228
**Category:** Logstash
**Created:** [August 23, 2021, 1:15pm UTC](https://discuss.elastic.co/t/logstash-filter-for-a-log-record-from-filebeats/282228 "2021-08-23T13:15:25Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [August 24, 2021, 2:04pm UTC](https://discuss.elastic.co/t/logstash-filter-for-a-log-record-from-filebeats/282228/4 "2021-08-24T14:04:39Z")

</div>

> [@Rabin\_Bhattacharya](#):
>
> Actually the requirement is to extract the XML from the log message. So if you see the log message there is a string before and after the message. How to remove that .

As I said, if you use store\_xml =\> true there is no need to extract the XML. If store\_xml =\> false then you can use [dissect](https://discuss.elastic.co/t/wich-is-the-best-way-to-parse-logs-with-xml-seccion/179556/2), grok, or [mutate+gsub](https://discuss.elastic.co/t/issue-while-parsing-xml-data/196988/4).

---

_[View the full topic](https://discuss.elastic.co/t/logstash-filter-for-a-log-record-from-filebeats/282228)._
