# Python elastic-apm log messages

**URL:** <https://discuss.elastic.co/t/python-elastic-apm-log-messages/310879>\
**Category:** APM\
**Tags:** python\
**Created:** [July 28, 2022, 2:12pm UTC](https://discuss.elastic.co/t/python-elastic-apm-log-messages/310879 "2022-07-28T14:12:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthiasthaler](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@matthiasthaler](https://discuss.elastic.co/u/matthiasthaler)\
**Post date:** [July 28, 2022, 2:12pm UTC](https://discuss.elastic.co/t/python-elastic-apm-log-messages/310879/1 "2022-07-28T14:12:48Z")

</div>

While trying to log messages with Python, without any framework and by [Instrumenting Custom Code](https://www.elastic.co/guide/en/apm/agent/python/current/instrumenting-custom-code.html#instrumenting-custom-code), i found out that every capture message or error is interpreted as [Error](https://www.elastic.co/guide/en/apm/agent/python/current/api.html#error-api).

Is there any possibility to simply log messages without having them marked as errors in the observability dashboard?

---

<div class="post-metadata">

**Author:** ![beniwohli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beniwohli/32/21256_2.png) [@beniwohli](https://discuss.elastic.co/u/beniwohli)\
**Post date:** [July 29, 2022, 9:30am UTC](https://discuss.elastic.co/t/python-elastic-apm-log-messages/310879/2 "2022-07-29T09:30:18Z")

</div>

Hi @matthiasthaler.

That's not possible I'm afraid. This mechanism is mostly targeted at capturing errors/messages with a lot of contextual information, e.g. stack traces. If you want to capture log messages, using [filebeat](https://www.elastic.co/guide/en/cloud/current/ec-getting-started-search-use-cases-python-logs.html) is a much better suited solution, as it is much more efficient.

---

<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:** [August 19, 2022, 5:30am UTC](https://discuss.elastic.co/t/python-elastic-apm-log-messages/310879/3 "2022-08-19T05:30:57Z")

</div>

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