Improve messages logged for exceptions

For few exceptions like database exceptions the exception object attributes contain extra info like exact PDO error which can be seen in error views but are not logged. So I added that.
Also added URL in logged messages non CLI requests.