At the moment, we have these choices when providing error messages / logs:
- Use code-blocks
This preserves the formatting of the error message, though it uses spurious highlighting and disables line-wrapping (both the latter are seldom appropriate)
2. Use code-blocks with <!-- language: none -->
Same as #1, but at least no inappropriate highlighting. 3. Use quote-marks
None of the drawbacks of #1 or #2, but even though it is marked as non-plaintext, it collapses whitespace (including newlines) like plain text. 4. Insert as normal text
None of the advantages of either previous option and all the drawbacks, though still popular with new users who do not know better or cannot be bothered.
None of those is really good for logs / errors which easily get just too wide.
What I propose is introducing an alternative, which is especially appropriate for logs and error-messages:
Add something like <!-- language: log -->
which makes code-blocks use no highlighting and word-wrap their lines instead of using horizontal scrolling.
This SO question shows which style would have to be applied to code-blocks marked as log:
How do I wrap text in a pre tag?