# Storing apm logs in file

**URL:** https://discuss.elastic.co/t/storing-apm-logs-in-file/375446
**Category:** Elastic Agent
**Created:** [March 5, 2025, 10:14am UTC](https://discuss.elastic.co/t/storing-apm-logs-in-file/375446 "2025-03-05T10:14:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Alex21](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex21/32/139887_2.png) [@Alex21](https://discuss.elastic.co/u/Alex21)
#### Post date: [March 5, 2025, 10:14am UTC](https://discuss.elastic.co/t/storing-apm-logs-in-file/375446/1 "2025-03-05T10:14:28Z")

</div>

I am using the Elastic APM Java agent with WildFly.  
Is it possible to store only APM event logs (such as request-response time) in a file instead of sending them to the APM server?

I tried using `-Delastic.apm.log_file` to store logs in a file, but it is also storing general APM logs. I only want to log performance-related metrics and do not want to send data to the APM server.

How can I disable log transmission to the APM server? Even after removing the `server_url`, the agent still attempts to send data.
