Log_ecs_reformatting not reformatting

Kibana version:8.11.1
Elasticsearch version:8.11.1
APM Server version:8.11.1
APM Agent language and version:Java - 1.34.0

I'm trying to monitor my Spring Boot logs with Elasticsearch, and currently, the logs are successfully being generated with the "trace. id". However, it displays "failed to find message in logs files". Logs are written to my local log path when I give the below property in JSON format, but it won't write when deployed on a Ubuntu server Websphere Application.

"log_ecs_reformatting=OVERRIDE"

The errors currently showing in my log file suggest there might be issues. Do you have any ideas on how to resolve this? it's not formatting and getting below warning.

First of all, please try with the latest apm-agent version and see if the problem persists.

If the problem still occurs, please provide the agent debug logs, which must include the agent startup.