# Logs not sent when elastic-apm-node is enabled, even with ECSformat

**URL:** <https://discuss.elastic.co/t/logs-not-sent-when-elastic-apm-node-is-enabled-even-with-ecsformat/381500>\
**Category:** Elastic Observability\
**Created:** [September 2, 2025, 12:16am UTC](https://discuss.elastic.co/t/logs-not-sent-when-elastic-apm-node-is-enabled-even-with-ecsformat/381500 "2025-09-02T00:16:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axel\_Couty1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axel_couty1/32/140210_2.png) [@Axel\_Couty1](https://discuss.elastic.co/u/Axel_Couty1)\
**Post date:** [September 2, 2025, 12:16am UTC](https://discuss.elastic.co/t/logs-not-sent-when-elastic-apm-node-is-enabled-even-with-ecsformat/381500/1 "2025-09-02T00:16:03Z")

</div>

Hey everyone,

First, thanks for your work !

I am trying to build a NestJS application and I would like to push logs to elasticsearch. The app's deployment does not allow me to use filebeat so I need to push logs directly to ES.  
I am using Elasticsearch Cloud Serverless (if that matters).

since it's a combination of libraries maybe that's not the right place, just tell me and sorry if that's the case.

### What's happening ?

Demo project: tell-ia/nestjs-apm-es

1. 

- Configure and start  
`bash npm run start`
- open [http://localhost:3000](http://localhost:3000) in a browser tab
- In Elasticsearch you can observe both logs from `app.controller.ts` and `app.service.ts` are visible and indexed into Elasticsearch.

1. Now, enable APM

- Edit .env or set APM\_ENABLED=true
- open [http://localhost:3000](http://localhost:3000) in a browser tab
- In Elasticsearch you can observe both logs from `app.controller.ts` and `app.service.ts` are **NOT INDEXED** into Elasticsearch.

would you have any ideas ?

Things to note:

- currently i'm pushing to a `something-logs`index and I created a datastream for that. this datastream is configured like this :

I'm not sure of this setting.

Have a good day !
