# Capture log.error

**URL:** <https://community.dynatrace.com/t/capture-log-error/49513>\
**Category:** Open Q&A\
**Tags:** services, oneagent, logs\
**Created:** [December 30, 2024, 10:19am UTC](https://community.dynatrace.com/t/capture-log-error/49513 "2024-12-30T10:19:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikas\_g1997](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@Vikas\_g1997](https://community.dynatrace.com/u/Vikas_g1997)\
**Post date:** [December 30, 2024, 10:19am UTC](https://community.dynatrace.com/t/capture-log-error/49513/1 "2024-12-30T10:19:58Z")

</div>

Hi Team,

We have a requirement from the customer to capture the log.error message (highlighted as **1** in the attached snapshot). Currently, we are only see the second exception captured to BizErrorCode.

Could someone guide us on how we can ensure the log.error exception is captured in Dynatrace? If there are specific configurations, such as logging integration or API usage, please let us know the steps to achieve this.

Looking forward to your suggestions.

 ![Vikas_g1997_0-1735553550424.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/7/57014da8527865d0031e94dade086f112613ae57.png)

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [December 30, 2024, 11:17am UTC](https://community.dynatrace.com/t/capture-log-error/49513/2 "2024-12-30T11:17:04Z")

</div>

Hi,

I can see too many exceptions are catched out-of-the-box, if you have OneAgent in fullstack. Have you check [Exception analysis](https://docs.dynatrace.com/docs/shortlink/exception-analysis)?

Best regards

---

<div class="post-metadata">

**Author:** ![Vikas\_g1997](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@Vikas\_g1997](https://community.dynatrace.com/u/Vikas_g1997)\
**Post date:** [December 30, 2024, 1:45pm UTC](https://community.dynatrace.com/t/capture-log-error/49513/3 "2024-12-30T13:45:46Z")

</div>

Hi&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)&nbsp;,

The application is not onboarded&nbsp; yet, but we want to confirm if it will be possible to capture the log.error message (highlighted as **1** in the attached snapshot) once onboarded.

We plan to test this scenario in the lower environment first.

---

<div class="post-metadata">

**Author:** ![RohitBisht](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rohitbisht/32/38577_2.png) [@RohitBisht](https://community.dynatrace.com/u/RohitBisht)\
**Post date:** [December 30, 2024, 11:02pm UTC](https://community.dynatrace.com/t/capture-log-error/49513/4 "2024-12-30T23:02:12Z")

</div>

By default, the exception should be captured and you can find more when you configure the agent.  
From the documentation:

> **[Configure service failure detection in Service Detection v1](https://docs.dynatrace.com/docs/observe/application-observability/services/service-detection/service-detection-v1/configure-service-failure-detection)**
>
> Discover which service error types Dynatrace automatically detects and learn how to adjust failure detection settings to meet your specific requirements.

By default, Dynatrace detects:

- Programming exceptions (Java, .NET, Node.js, and PHP) as the reason for failed requests when exceptions result in the abort of service calls.

If still not captured, you can define custom exception detection, using this.

> **[Configure service failure detection in Service Detection v1](https://docs.dynatrace.com/docs/observe/application-observability/services/service-detection/service-detection-v1/configure-service-failure-detection)**
>
> Discover which service error types Dynatrace automatically detects and learn how to adjust failure detection settings to meet your specific requirements.

Screenshot from my lab:

 ![RohitBisht_0-1735599702587.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/b2daf88008ce9e6edfbf3bec5756def251bd2324.png)

---

<div class="post-metadata">

**Author:** ![Vikas\_g1997](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@Vikas\_g1997](https://community.dynatrace.com/u/Vikas_g1997)\
**Post date:** [January 16, 2025, 8:04am UTC](https://community.dynatrace.com/t/capture-log-error/49513/5 "2025-01-16T08:04:22Z")

</div>

Hi&nbsp;[@RohitBisht](https://community.dynatrace.com/user/45903)&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)&nbsp;,

We tried using custom exceptions and capturing them with the request attribute method, but it seems that the logs generated by the SLF4J framework are not tied to the class as expected. The issue is that the logs appear to be generated independently of the class, and this approach doesn’t seem to work.

Could you please suggest a solution for capturing these logs, especially since the customer is not using log monitoring

 ![Vikas_g1997_0-1737014562396.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/26f5bb2ebbccc6321dcdfb53f9bfa0a95da02a5e.png)

---

<div class="post-metadata">

**Author:** ![RohitBisht](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rohitbisht/32/38577_2.png) [@RohitBisht](https://community.dynatrace.com/u/RohitBisht)\
**Post date:** [January 18, 2025, 6:53am UTC](https://community.dynatrace.com/t/capture-log-error/49513/6 "2025-01-18T06:53:31Z")

</div>

Hi [@Vikas\_g1997](https://community.dynatrace.com/user/57336)&nbsp;,

I would suggest to check one agent features in settings → preferences → one agent features and look for optional tracing features, enable it and test it.

Best is to open a support case as this definitely needs a deep dive.
