fix #1048

All the logging related  code was moved to safe. in safe_qgis we only add the qgis handler and if needed sentry