# Is possible to print debug message in Filebeat Script Processor

**URL:** <https://discuss.elastic.co/t/is-possible-to-print-debug-message-in-filebeat-script-processor/348801>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 7, 2023, 10:29am UTC](https://discuss.elastic.co/t/is-possible-to-print-debug-message-in-filebeat-script-processor/348801 "2023-12-07T10:29:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chen\_Wei](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chen_wei/32/127587_2.png) [@Chen\_Wei](https://discuss.elastic.co/u/Chen_Wei)\
**Post date:** [December 7, 2023, 10:29am UTC](https://discuss.elastic.co/t/is-possible-to-print-debug-message-in-filebeat-script-processor/348801/1 "2023-12-07T10:29:42Z")

</div>

I am using Filebeat to index log file and want to drop duplicated messages in the log file. So I write a JS script and load it with the Script Processor. Now I want to report the duplication in the filebeat log. Add some llines like "console.debug('duplication found')" in the JS file. But I cannot find any document saying I can do this.

An alternative is using Event API to add debugMsg field in event, and drop it later by drop\_field processor, But I cannot find any document saying that can only configure the drop\_field process to print debug log.

---

<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:** [January 4, 2024, 12:30pm UTC](https://discuss.elastic.co/t/is-possible-to-print-debug-message-in-filebeat-script-processor/348801/2 "2024-01-04T12:30:17Z")

</div>

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