Formatting message
loranger opened this issue · 4 comments
Hello (and thank you for this useful package)
I'd like to format a bit my error message.
I was wondering where I was supposed to write down my LERN::setMessage
closure, so I put it in my Exceptions/Handler.php
file, inside my report
method:
if (app()->bound("lern")) {
app()->make("lern")->setMessage(function ($exception) {
...
Am I doing right ?
I'm also trying to format my exceptions notification message and that's the aim of this issue.
I mainly use slack and I'm trying to beautify a bit the messages.
I tried to create new lines and add some bold such as
$msg .= "*URL*: {$method}@<{$url}>\r\n" . PHP_EOL;
But i doesn't work.
It seems a config flag mrkdwn
have to be set to true
but I can't figure out how and where I can do it.
Could you help, please ?
That's much better, indeed.
I still miss the slack formatting (kind of minimal markdown) but at least, the reports are definitely readable !
Thank you so much !
By the way, It would be useful to being able to get the id of the current recorded exception from the notification itself.
That would be helpful to add a link to the current full and formatted exception from the notification message.
@tylercd100 is it possible to add markdown support for slack channel, to make the messages more readable?
Basic code formatting like in Cherry-Pie/LogEnvelope package would make messages more readable!
@tylercd100 I still have problems with markdown rendering on the latest version. Markdown markup looks like normal text, any idea how to fix it?