# Logs are not Pushing to Elastic APM Server - FastAPI

**URL:** <https://discuss.elastic.co/t/logs-are-not-pushing-to-elastic-apm-server-fastapi/321922>\
**Category:** Elastic Observability\
**Created:** [December 23, 2022, 2:42pm UTC](https://discuss.elastic.co/t/logs-are-not-pushing-to-elastic-apm-server-fastapi/321922 "2022-12-23T14:42:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![azar8012](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@azar8012](https://discuss.elastic.co/u/azar8012)\
**Post date:** [December 23, 2022, 2:42pm UTC](https://discuss.elastic.co/t/logs-are-not-pushing-to-elastic-apm-server-fastapi/321922/1 "2022-12-23T14:42:12Z")

</div>

I have installed elastic-apm agent with my FastAPI application. I have configured the Elastic APM server. The logs are generated locally but these logs I can't able to see it on Elastic APM server.

Here is the configuration, I have set.

> apm = make\_apm\_client({  
> 'SERVER\_URL': "Logstash URL",  
> 'SERVICE\_NAME': '\<index\_name\>--metrics',  
> 'SECRET\_TOKEN': '',  
> 'DEBUG': True,  
> 'ENVIRONMENT': 'dev',  
> })  
> app.add\_middleware(ElasticAPM, client=apm)

The logs are generated in local (used **ecs-logging** package),  
{"@timestamp":"2022-12-23T13:18:18.634Z","log.level":"info","message":"retriving Internal User IP -\> Test APM Server","ecs":{"version":"1.6.0"},"log":{"logger":"elasticapm","origin":{"file":{"line":54,"name":"app.py"},"function":"graph"},"original":"retriving Internal User IP -\> Test APM Server"},"process":{"name":"SpawnProcess-1","pid":203,"thread":{"id":1642,"name":"MainThread"}},"service":{"name":"test-index--metrics"},"trace":{"id":"8128f5a24214660ca5c69e3c3f36"},"transaction":{"id":"c3ea48535e7b"}}

Kindly help me what I have missed in the configuration. I can't able to see the logs in APM server.
