I get error messages with some layers, but I can only see their first line and they disappear before I get the chance to read them.
How can I prevent this issue?
You can also show all logged message by displaying the log panel.
Go to the view
menu then panels
and finally log messages
Assuming these are QgsMessageBar elements displayed in the message bar, they have a "pause" button with a timer on the left. Just click on it and the message will stay.