Downgrade some errors/warnings
This commit is contained in:
parent
322da46448
commit
ed900eb84b
@ -60,11 +60,10 @@ class SyncPushTokensJob: NSObject {
|
||||
} else if !Self.hasUploadedTokensOnce.get() {
|
||||
reason = "launched"
|
||||
} else {
|
||||
Logger.info("No reason to upload pushToken: \(redact(pushToken))")
|
||||
return
|
||||
}
|
||||
|
||||
Logger.warn("Uploading push token; reason: \(reason), pushToken: \(redact(pushToken))")
|
||||
Logger.info("uploading push token; reason: \(reason), pushToken: \(redact(pushToken))")
|
||||
try await self.updatePushTokens(pushToken: pushToken)
|
||||
|
||||
await recordPushTokensLocally(pushToken: pushToken)
|
||||
@ -86,10 +85,8 @@ class SyncPushTokensJob: NSObject {
|
||||
assert(!Thread.isMainThread)
|
||||
|
||||
await SSKEnvironment.shared.databaseStorageRef.awaitableWrite { tx in
|
||||
Logger.warn("Recording push tokens locally. pushToken: \(redact(pushToken))")
|
||||
|
||||
if pushToken != SSKEnvironment.shared.preferencesRef.getPushToken(tx: tx) {
|
||||
Logger.info("Recording new plain push token")
|
||||
Logger.info("saved new push token: \(redact(pushToken))")
|
||||
SSKEnvironment.shared.preferencesRef.setPushToken(pushToken, tx: tx)
|
||||
}
|
||||
}
|
||||
|
||||
@ -455,15 +455,11 @@ extension OWSSyncManager: SyncManagerProtocol, SyncManagerProtocolSwift {
|
||||
}
|
||||
|
||||
private func _syncContacts(mode: ContactSyncMode) async throws {
|
||||
let logger = PrefixedLogger(prefix: "ContactSync:\(mode)")
|
||||
|
||||
// Don't bother sending sync messages with the same data as the last
|
||||
// successfully sent contact sync message.
|
||||
let opportunistic = mode == .allSignalAccountsIfChanged
|
||||
|
||||
if CurrentAppContext().isNSE {
|
||||
logger.warn("Skipping: in NSE.")
|
||||
|
||||
// If a full sync is specifically requested in the NSE, mark it so that the
|
||||
// main app can send that request the next time in runs.
|
||||
if mode == .allSignalAccounts {
|
||||
@ -487,7 +483,6 @@ extension OWSSyncManager: SyncManagerProtocol, SyncManagerProtocolSwift {
|
||||
// Don't bother building the message if nobody will receive it. If a new
|
||||
// device is linked, they will request a re-send.
|
||||
guard hasAnyLinkedDevice else {
|
||||
logger.warn("Skipping: no linked devices.")
|
||||
return
|
||||
}
|
||||
|
||||
@ -497,7 +492,6 @@ extension OWSSyncManager: SyncManagerProtocol, SyncManagerProtocolSwift {
|
||||
|
||||
let result = try SSKEnvironment.shared.databaseStorageRef.read { tx in try buildContactSyncMessage(in: thread, mode: mode, tx: tx) }
|
||||
guard let result else {
|
||||
logger.warn("Skipping: no buildContactSyncMessageResult.")
|
||||
return
|
||||
}
|
||||
|
||||
@ -513,8 +507,6 @@ extension OWSSyncManager: SyncManagerProtocol, SyncManagerProtocolSwift {
|
||||
// we should send that request since we've been given a strong signal that
|
||||
// someone is waiting to receive this message.
|
||||
if opportunistic, result.fullSyncRequestId == nil, messageHash == result.previousMessageHash {
|
||||
// Ignore redundant contacts sync message.
|
||||
logger.warn("Skipping: redundant.")
|
||||
return
|
||||
}
|
||||
|
||||
@ -539,8 +531,6 @@ extension OWSSyncManager: SyncManagerProtocol, SyncManagerProtocolSwift {
|
||||
Self.keyValueStore.setData(messageHash, key: Constants.lastContactSyncKey, transaction: tx)
|
||||
self.clearFullSyncRequestId(ifMatches: result.fullSyncRequestId, tx: tx)
|
||||
}
|
||||
|
||||
logger.info("Sent!")
|
||||
}
|
||||
|
||||
private struct BuildContactSyncMessageResult {
|
||||
|
||||
@ -171,7 +171,7 @@ public class OWSMessageDecrypter {
|
||||
)
|
||||
}
|
||||
|
||||
Logger.error(logString)
|
||||
Logger.warn(logString)
|
||||
|
||||
let wrappedError: Error
|
||||
if (error as NSError).domain == OWSError.errorDomain {
|
||||
|
||||
@ -621,7 +621,7 @@ class OWSChatConnectionUsingLibSignal<Connection: ChatConnection & Sendable>: OW
|
||||
} catch SignalError.deviceDeregistered(_) {
|
||||
// Handled by the subclass; this isn't a connection failure.
|
||||
} catch {
|
||||
Logger.error("\(self.logPrefix): failed to connect: \(error)")
|
||||
Logger.warn("\(self.logPrefix): failed to connect: \(error)")
|
||||
OutageDetection.shared.reportConnectionFailure()
|
||||
}
|
||||
let result = await connectionAttemptCompleted(.closed(task: nil))
|
||||
@ -812,7 +812,7 @@ class OWSChatConnectionUsingLibSignal<Connection: ChatConnection & Sendable>: OW
|
||||
self.consecutiveFailureCount += 1
|
||||
|
||||
let formattedReconnectDelay = String(format: "%.1f", reconnectDelay)
|
||||
Logger.warn("Scheduling reconnect after \(formattedReconnectDelay)s")
|
||||
Logger.info("Scheduling reconnect after \(formattedReconnectDelay)s")
|
||||
|
||||
// Wait a few seconds before retrying to reduce server load.
|
||||
self.serialQueue.asyncAfter(deadline: .now() + reconnectDelay) { [weak self] in
|
||||
|
||||
@ -1091,7 +1091,7 @@ public class NotificationPresenterImpl: NotificationPresenter {
|
||||
|
||||
public func notifyTestPopulation(ofErrorMessage errorString: String) {
|
||||
// External devices should still log the error string.
|
||||
Logger.error("Fatal error occurred: \(errorString).")
|
||||
Logger.warn("Potentially notifying about: \(errorString).")
|
||||
guard DebugFlags.testPopulationErrorAlerts else {
|
||||
return
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user