# How to extract log from .BZ2 input file? Logstash

**URL:** <https://discuss.elastic.co/t/how-to-extract-log-from-bz2-input-file-logstash/357402>\
**Category:** Logstash\
**Created:** [April 15, 2024, 9:54am UTC](https://discuss.elastic.co/t/how-to-extract-log-from-bz2-input-file-logstash/357402 "2024-04-15T09:54:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo23](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Leo23](https://discuss.elastic.co/u/Leo23)\
**Post date:** [April 15, 2024, 9:54am UTC](https://discuss.elastic.co/t/how-to-extract-log-from-bz2-input-file-logstash/357402/1 "2024-04-15T09:54:53Z")

</div>

Hello, I want to extract logs from compress file in .bz2 do there is a way to do that ? I do it from .gz but seems to don't work with bz2 files.

---

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [April 21, 2024, 3:58pm UTC](https://discuss.elastic.co/t/how-to-extract-log-from-bz2-input-file-logstash/357402/2 "2024-04-21T15:58:25Z")

</div>

Hi,

Elasticsearch does not natively support the extraction of logs from .bz2 compressed files.

Regards
