# Debug logs not working

**URL:** <https://discuss.elastic.co/t/debug-logs-not-working/362801>\
**Category:** Elastic Agent\
**Tags:** fleet\
**Created:** [July 9, 2024, 2:11pm UTC](https://discuss.elastic.co/t/debug-logs-not-working/362801 "2024-07-09T14:11:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chntatxt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chntatxt/32/135913_2.png) [@chntatxt](https://discuss.elastic.co/u/chntatxt)\
**Post date:** [July 9, 2024, 2:11pm UTC](https://discuss.elastic.co/t/debug-logs-not-working/362801/1 "2024-07-09T14:11:46Z")

</div>

Hello Elastic community,

I have an issue with elastic-agent debug logging, perhaps you could help me ?

Some events are dropped because the mapping changed o logs, but it's impossible for me to find where exactly, i have millions of logs sended hourly and rollover didn't do the trick.

Messages on elastic-agent logs are always the same :

> Cannot index event (status=400): dropping event! Enable debug logs to view the event and cause.

So, i added this to elastic-agent.yml and restart :

```auto
agent.logging.level: debug
agent.logging.metrics.enabled: false
agent.logging.to_files: true
agent.logging.files:
  path: /var/log/elastic-agent
  name: elastic-agent
  keepfiles: 7
  permissions: 0600

fleet:
  enabled: true

```

The problem is that no debug logs are writted to dest, where info or warn logs are.  
Whatever if i add agent.logging.selectors: ["beat", "publish", "service"], or send logs to syslog/stderr, or even launch elastic-agent with -e -c options, it never works.

Do you have any idea ?

My elastic-agent is running on Debian 12.5, version 8.14.1, executing a Custom Logs integration.

Thank you 🙂 !

---

<div class="post-metadata">

**Author:** ![chntatxt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chntatxt/32/135913_2.png) [@chntatxt](https://discuss.elastic.co/u/chntatxt)\
**Post date:** [July 9, 2024, 2:21pm UTC](https://discuss.elastic.co/t/debug-logs-not-working/362801/2 "2024-07-09T14:21:48Z")

</div>

Added #fleet

---

<div class="post-metadata">

**Author:** ![Julia\_Bardi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julia_bardi/32/79463_2.png) [@Julia\_Bardi](https://discuss.elastic.co/u/Julia_Bardi)\
**Post date:** [July 9, 2024, 2:36pm UTC](https://discuss.elastic.co/t/debug-logs-not-working/362801/3 "2024-07-09T14:36:53Z")

</div>

Hi Manu,

Are you using a Fleet managed agent? If so, you can set the debug log level from the UI like this: [Monitor Elastic Agents | Fleet and Elastic Agent Guide [8.14] | Elastic](https://www.elastic.co/guide/en/fleet/current/monitor-elastic-agent.html#change-logging-level)

---

<div class="post-metadata">

**Author:** ![chntatxt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chntatxt/32/135913_2.png) [@chntatxt](https://discuss.elastic.co/u/chntatxt)\
**Post date:** [July 9, 2024, 2:55pm UTC](https://discuss.elastic.co/t/debug-logs-not-working/362801/4 "2024-07-09T14:55:26Z")

</div>

Hello Julia, yes i'm using fleet and your solution did the trick !  
Thank you so much ! 🙂

---

<div class="post-metadata">

**Author:** ![Dede\_Pessu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dede_pessu/32/44473_2.png) [@Dede\_Pessu](https://discuss.elastic.co/u/Dede_Pessu)\
**Post date:** [January 15, 2025, 4:58pm UTC](https://discuss.elastic.co/t/debug-logs-not-working/362801/5 "2025-01-15T16:58:30Z")

</div>

I am experiencing this same issue but I am not using fleet managed my agents are standalone
