Improvements to logging (#457)

* Use `.info` logging in most places.
* Remove old objc logging support.
* Fix table view controller.
* Make sure timeline item content isn't logged.
* Add tests.
This commit is contained in:
Doug
2023-01-17 09:28:01 +00:00
committed by GitHub
parent 4b56e4af73
commit c8937505d7
57 changed files with 542 additions and 275 deletions
@@ -71,7 +71,7 @@ class Analytics {
client.stop()
// monitoringClient.stop()
MXLog.debug("Stopped.")
MXLog.info("Stopped.")
}
/// Starts the analytics client if the user has opted in, otherwise does nothing.
@@ -84,7 +84,7 @@ class Analytics {
// Sanity check in case something went wrong.
guard client.isRunning else { return }
MXLog.debug("Started.")
MXLog.info("Started.")
// Catch and log crashes
// MXLogger.logCrashes(true)
@@ -121,7 +121,7 @@ class Analytics {
client.reset()
// monitoringClient.reset()
MXLog.debug("Reset.")
MXLog.info("Reset.")
ServiceLocator.shared.settings.isIdentifiedForAnalytics = false
// Stop collecting crash logs
@@ -146,7 +146,7 @@ class Analytics {
}
client.identify(id: id)
MXLog.debug("Identified.")
MXLog.info("Identified.")
ServiceLocator.shared.settings.isIdentifiedForAnalytics = true
}
@@ -59,7 +59,7 @@ class AnalyticsService {
let newSettings = AnalyticsSettings.new(currentEvent: settings)
switch await userSession.clientProxy.setAccountData(content: newSettings, type: AnalyticsSettings.eventType) {
case .failure:
MXLog.warning("Failed to update analytics settings.")
MXLog.error("Failed to update analytics settings.")
return .failure(.accountDataFailure)
case .success:
MXLog.debug("Successfully updated analytics settings in account data.")