mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
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:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user