Description
Summary
Since log messages often contains special characters in markdown, I would like to forward messages in code blocks.
some error messages lib/foo.rb:100:in `initialize'
(NOTE: This is an example for GitHub flavored markdown, and we need to use different format for Slack.)
Background
I am using Slack now, and this Plugin is really useful to forward messages. I am mainly using the plugin to send some error messages to Slack.
The problem here is that since the message often contains special characters, we often see some malformated messages.
Current Message Example
Following are the sample messages sent to Slack (Ruby error message with backtrace and URL path). Although this is formatted with GitHub flavored markdown, it still shows the underlying problems on Slack notification.
ERROR -- : Faraday::ConnectionFailed (execution expired) at lib/foo.rb:100:in
initialize' <<< lib/bar.rb:7:in
initialize', path: /path/to/api?matcher1=&matcher2=hoge&matcher3=
Here, we can see the following problems, and I believe this is pretty common when handling log messages.
- line numbers is converted into emoji 💯
- backquotes indicating method make
mispaired inline code
- asterisks in path make partial text italic
Proposed Solution
I just would like to make the message preformatted with ```
like the GitHub app for Slack.
This can be achieved by improving the following line and adding some options.
Activity