Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting message #40

Open
loranger opened this issue Sep 1, 2016 · 4 comments
Open

Formatting message #40

loranger opened this issue Sep 1, 2016 · 4 comments

Comments

@loranger
Copy link

loranger commented Sep 1, 2016

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 ?

@tylercd100
Copy link
Owner

Hey @loranger , please give version 3.6.6 a try. Let me know if it fixes the issue with new lines

Yes you are using the setMessage method correctly :-)

@loranger
Copy link
Author

loranger commented Sep 2, 2016

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.

@TUNER88
Copy link

TUNER88 commented Mar 6, 2017

@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!

@TUNER88
Copy link

TUNER88 commented Apr 28, 2017

@tylercd100 I still have problems with markdown rendering on the latest version. Markdown markup looks like normal text, any idea how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants