[GH-ISSUE #1086] LineFormatter does not include stacktraces for "previous" exceptions #439

Closed
opened 2026-03-04 02:15:03 +03:00 by kerem · 2 comments
Owner

Originally created by @mpdude on GitHub (Nov 24, 2017).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1086

I am using the LineFormatter to log exceptions with stack traces.

However, previous exceptions are only logged with their class name, file, code and message, but no stack trace included. In many cases I have seen the stack trace of the "root" exception would be the interesting information I'd need.

So, short question: Would you support/merge a (probably trivial) PR to include stacktraces for all previous exceptions as well?

Should this be changed in LineFormatter only, or are there any other/better places?

Originally created by @mpdude on GitHub (Nov 24, 2017). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1086 I am using the `LineFormatter` to log exceptions with stack traces. However, `previous` exceptions are only logged with their class name, file, code and message, but no stack trace included. In many cases I have seen the stack trace of the "root" exception would be the interesting information I'd need. So, short question: Would you support/merge a (probably trivial) PR to include stacktraces for all `previous` exceptions as well? Should this be changed in `LineFormatter` only, or are there any other/better places?
kerem 2026-03-04 02:15:03 +03:00
  • closed this issue
  • added the
    Feature
    label
Author
Owner

@Seldaek commented on GitHub (Jun 9, 2018):

LineFormatter is the only one with this issue it seems. So yes it's the only place to patch IMO. Feel free to send a PR targetting master branch, I think this is a bit too invasive to the log format to include in 1.x

<!-- gh-comment-id:395976756 --> @Seldaek commented on GitHub (Jun 9, 2018): LineFormatter is the only one with this issue it seems. So yes it's the only place to patch IMO. Feel free to send a PR targetting master branch, I think this is a bit too invasive to the log format to include in 1.x
Author
Owner

@mpdude commented on GitHub (Jun 18, 2018):

See #1170.

<!-- gh-comment-id:398099331 --> @mpdude commented on GitHub (Jun 18, 2018): See #1170.
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#439
No description provided.