There's no rule about formatting error/log messages; what should be done is what looks better. If the spacing, tabs, new lines, etc.. are important and for readability and clarity, then a code block formation will be better.
I think you shouldn't waste your time about that, just leave it as is and move on to the next edit, that newline is not really a big deal.
If we were looking for example at a Java stack trace, then it's very clear that
Exception in thread "main" java.lang.NullPointerException
at com.example....
at com.example....
at com.example....
looks much better than
Exception in thread "main" java.lang.NullPointerException
at com.example.myproject.Book.getTitle(Book.java:16)
at com.example.myproject.Author.getBookTitles(Author.java:25)
at com.example.myproject.Bootstrap.main(Bootstrap.java:14)