Add raise_errors method to allow the application to handle logging errors