Logging of exceptions.