# How to write custom debugging of logstash

**URL:** <https://discuss.elastic.co/t/how-to-write-custom-debugging-of-logstash/38314>\
**Category:** Logstash\
**Created:** [January 4, 2016, 1:27pm UTC](https://discuss.elastic.co/t/how-to-write-custom-debugging-of-logstash/38314 "2016-01-04T13:27:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chicco\_95](https://avatars.discourse-cdn.com/v4/letter/c/ce7236/32.png) [@chicco\_95](https://discuss.elastic.co/u/chicco_95)\
**Post date:** [January 4, 2016, 1:27pm UTC](https://discuss.elastic.co/t/how-to-write-custom-debugging-of-logstash/38314/1 "2016-01-04T13:27:06Z")

</div>

Hi all,

I should record in the logs of logstash something like :  
loading date: .... / file name: ..... / lines insede the file: ..... / record loaded: ......

how can I do it ?

Thank you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 5, 2016, 1:57am UTC](https://discuss.elastic.co/t/how-to-write-custom-debugging-of-logstash/38314/2 "2016-01-05T01:57:01Z")

</div>

Something like [https://www.elastic.co/guide/en/logstash/1.5/plugins-filters-metrics.html](https://www.elastic.co/guide/en/logstash/1.5/plugins-filters-metrics.html) may help.

---

<div class="post-metadata">

**Author:** ![chicco\_95](https://avatars.discourse-cdn.com/v4/letter/c/ce7236/32.png) [@chicco\_95](https://discuss.elastic.co/u/chicco_95)\
**Post date:** [January 5, 2016, 8:03am UTC](https://discuss.elastic.co/t/how-to-write-custom-debugging-of-logstash/38314/3 "2016-01-05T08:03:35Z")

</div>

ok, but how can I bring everything to a file ?  
for example , when loading a file , I wish the same time was written on a text file ( .log ) the name of the file loading , the lines of the records and files loaded on ES .  
it's possible?

---

<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, 5:16am UTC](https://discuss.elastic.co/t/how-to-write-custom-debugging-of-logstash/38314/4 "2017-07-06T05:16:49Z")

</div>

Closed on July 6, 2017, 5:16am UTC


