I'm trying to use slack attachments to log application errors but the large fields like the stack trace are behaving weirdly.
First, when using attachments the table seems to be fixed to some arbitrary width, is there anyway to change this so a wider value can be allowed? Otherwise 50+% of the slack window is blank, a complete waste.
Using just text works fine, but there are a number of other smaller fields included that benefit from the field format.
Also I'm having a problem with slack doing strange wrapping when the message is large. Below is just a small snippet with a few characters falling off, but on the full stack there can be substantial loss.
Example (slack message builder)
Adding a single character to the string and now it starts chopping things off (the text is all there and selectable, it's just doing a terrible job at wrapping.)
Example 2
Anyone have any suggestions to get something even slightly more useful?
Slack will truncate messages containing more than 40,000 characters. If you need to post longer messages, please consider uploading a snippet instead.
Blockquotes: To add angle brackets at the start of your message for indents and quotes, type ">" to indent a single lines or ">>>" to indent multiple paragraphs.
You must provide either a file or content parameter. The content of the file can either be posted using an enctype of multipart/form-data (with the file parameter named file ), in the usual way that files are uploaded via the browser, or the content of the file can be sent as a POST var called content .
Tap and hold the message you'd like to share and select Share message. Tap the #channel name and choose where you'd like to share the message. Add an optional note, if you'd like.
I would suggest to upload the application errors as text file (Plain Text Snippet) instead putting the info into a message. That way you can post more data and the formatting is also better suited for this kind of data.
You can auto-share your uploaded file in a channel and it will appear as new message. You can also add comments to is if you want to convey more information.
Use the files.upload
method to upload your error text as file with the filetype
set to text
to get a text snippet.
Here is an example how it looks like on Slack, when an app posts a new text snippet as described:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With