Logging Errors

I wonder if anybody has managed to log errors somehow or if there is any way to do it. For example from time to time I have Errors that pop-up on the screen for 1 sec and disappear. Those are almost impossible to read. I would like either to see the error message a bit longer on the screen so I can read it OR go to some log file to trace it. Not sure where can I set this up ? Perhaps in PHP settings but I’m not versed well in PHP setup. Any help appreciated. Thank you.

can you point to an example of error that disappears?