[GH-ISSUE #1863] How do I use includeStacktraces? #796

Closed
opened 2026-03-04 02:18:06 +03:00 by kerem · 1 comment
Owner

Originally created by @berniedurfee-renaissance on GitHub (Dec 21, 2023).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1863

Monolog version 2.5

I don't see any docs on how to use includeStacktraces. Do I add the exception to the log context and it logs the stacktrace there?

I'm using the JSON formatter.

Originally created by @berniedurfee-renaissance on GitHub (Dec 21, 2023). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1863 Monolog version 2.5 I don't see any docs on how to use `includeStacktraces`. Do I add the `exception` to the log context and it logs the stacktrace there? I'm using the JSON formatter.
kerem 2026-03-04 02:18:06 +03:00
  • closed this issue
  • added the
    Support
    label
Author
Owner

@Seldaek commented on GitHub (Apr 12, 2024):

Yes, ['exception' => $e] in context and then ->includeStacktraces(true) on the formatter should output full stack traces.

<!-- gh-comment-id:2051394125 --> @Seldaek commented on GitHub (Apr 12, 2024): Yes, `['exception' => $e]` in context and then `->includeStacktraces(true)` on the formatter should output full stack traces.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#796
No description provided.