# Incoorporate APM agent logging with application logging

**URL:** <https://discuss.elastic.co/t/incoorporate-apm-agent-logging-with-application-logging/337464>\
**Category:** Elastic Agent\
**Created:** [July 3, 2023, 1:38pm UTC](https://discuss.elastic.co/t/incoorporate-apm-agent-logging-with-application-logging/337464 "2023-07-03T13:38:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smoke](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Smoke](https://discuss.elastic.co/u/Smoke)\
**Post date:** [July 3, 2023, 1:38pm UTC](https://discuss.elastic.co/t/incoorporate-apm-agent-logging-with-application-logging/337464/1 "2023-07-03T13:38:58Z")

</div>

Hello all,

I am trying to incoorporate the logging coming from the apm agent with my application logging. However, I do not seem to be able to figure out how to use the custom layout class that I defined and use for my application logging to also format my apm agent logging. I am using the logback-spring.xml. I already tried to add the co.elastic.apm.agent as a logger configuration and reference it to my appender:

```auto
<logger name="co.elastic.apm.agent" level="INFO">
        <appender-ref ref="CONSOLE" />
    </logger>

```

But this does not change anything. Has anyone managed to format the apm logging in such a way that it becomes possible to add custom fields and convert to JSON format? I can see the apm agent logging in my openshift console. So it is showing up. I would be interested to see this to for example see when the apm has connection issues with the server together with my application logging in Kibana. Has anyone done this succesfully?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 31, 2023, 1:39pm UTC](https://discuss.elastic.co/t/incoorporate-apm-agent-logging-with-application-logging/337464/2 "2023-07-31T13:39:10Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
