brille24 / markdown-formatter
Formatting a stacktrace with markdown for monolog
Installs: 33 242
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 1
Open Issues: 1
Requires
- php: >=7.2
- ext-json: *
- monolog/monolog: 1.*|2.*
- symfony/string: ^5.1
Requires (Dev)
- phpunit/phpunit: ^8|^9
README
A formatter that prints the stack trace in markdown like so:
❗ Exception occurred here:
Context:
{ "failed_test": "some tests failed." }
Usage
composer require brille24/markdown-formatter
Define the class Brille24\MarkdownFormatter\MarkdownFormatter
as a service and use it (assuming that auto-wiring is on):
monolog: type: 'service' id: "Brille24\\MarkdownFormatter\\MarkdownFormatter"
If you want to customize the base path that the location is relative to you can pass the first argument to the root of the project eg.
service: Brille24\MarkdownFormatter\MarkdownFormatter: arguments: - '/some/path/to/the/project'