mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-27 08:35:53 +03:00
[GH-ISSUE #1741] How to get private variables from exception? #731
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#731
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jokaorgua on GitHub (Aug 1, 2022).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1741
I'm using symfony-monolog-bundle 3.8.0 which uses monolog 3.1
I have an exception class
When I try to throw this exception in the console or any other place I get such a message
So the question is: how to get the id $entityId ? I want the "exception" field to be expanded and show all the private or public variables. I've tried to add JsonSerializable implementation to the exception but that didn't help
Need some advice. Thanks
@Seldaek commented on GitHub (Aug 2, 2022):
That's right, exceptions are just serialized as their message and stack trace. If you need more info I'd recommend passing it to the log's context directly.