Keep logs concerning decryption errors longer.
This commit is contained in:
parent
ef950bdbb5
commit
4eb2f16ef1
2 changed files with 12 additions and 12 deletions
|
@ -93,21 +93,21 @@ public class AutomaticSessionResetJob extends BaseJob {
|
|||
DeviceLastResetTime resetTimes = SignalDatabase.recipients().getLastSessionResetTimes(recipientId);
|
||||
long timeSinceLastReset = System.currentTimeMillis() - getLastResetTime(resetTimes, deviceId);
|
||||
|
||||
Log.i(TAG, "DeviceId: " + deviceId + ", Reset interval: " + resetInterval + ", Time since last reset: " + timeSinceLastReset);
|
||||
Log.i(TAG, "DeviceId: " + deviceId + ", Reset interval: " + resetInterval + ", Time since last reset: " + timeSinceLastReset, true);
|
||||
|
||||
if (timeSinceLastReset > resetInterval) {
|
||||
Log.i(TAG, "We're good! Sending a null message.");
|
||||
Log.i(TAG, "We're good! Sending a null message.", true);
|
||||
|
||||
SignalDatabase.recipients().setLastSessionResetTime(recipientId, setLastResetTime(resetTimes, deviceId, System.currentTimeMillis()));
|
||||
Log.i(TAG, "Marked last reset time: " + System.currentTimeMillis());
|
||||
Log.i(TAG, "Marked last reset time: " + System.currentTimeMillis(), true);
|
||||
|
||||
sendNullMessage();
|
||||
Log.i(TAG, "Successfully sent!");
|
||||
Log.i(TAG, "Successfully sent!", true);
|
||||
} else {
|
||||
Log.w(TAG, "Too soon! Time since last reset: " + timeSinceLastReset);
|
||||
Log.w(TAG, "Too soon! Time since last reset: " + timeSinceLastReset, true);
|
||||
}
|
||||
} else {
|
||||
Log.w(TAG, "Automatic session reset send disabled!");
|
||||
Log.w(TAG, "Automatic session reset send disabled!", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ public final class MessageDecryptionUtil {
|
|||
return DecryptionResult.forError(MessageState.INVALID_VERSION, toExceptionMetadata(e), jobs);
|
||||
|
||||
} catch (ProtocolInvalidKeyIdException | ProtocolInvalidKeyException | ProtocolUntrustedIdentityException | ProtocolNoSessionException | ProtocolInvalidMessageException e) {
|
||||
Log.w(TAG, String.valueOf(envelope.getTimestamp()), e);
|
||||
Log.w(TAG, String.valueOf(envelope.getTimestamp()), e, true);
|
||||
Recipient sender = Recipient.external(context, e.getSender());
|
||||
|
||||
if (sender.supportsMessageRetries() && Recipient.self().supportsMessageRetries() && FeatureFlags.retryReceipts()) {
|
||||
|
@ -155,11 +155,11 @@ public final class MessageDecryptionUtil {
|
|||
try {
|
||||
groupId = Optional.of(GroupId.push(protocolException.getGroupId().get()));
|
||||
} catch (BadGroupIdException e) {
|
||||
Log.w(TAG, "[" + envelope.getTimestamp() + "] Bad groupId!");
|
||||
Log.w(TAG, "[" + envelope.getTimestamp() + "] Bad groupId!", true);
|
||||
}
|
||||
}
|
||||
|
||||
Log.w(TAG, "[" + envelope.getTimestamp() + "] Could not decrypt a message with a type of " + contentHint);
|
||||
Log.w(TAG, "[" + envelope.getTimestamp() + "] Could not decrypt a message with a type of " + contentHint, true);
|
||||
|
||||
long threadId;
|
||||
|
||||
|
@ -172,16 +172,16 @@ public final class MessageDecryptionUtil {
|
|||
|
||||
switch (contentHint) {
|
||||
case DEFAULT:
|
||||
Log.w(TAG, "[" + envelope.getTimestamp() + "] Inserting an error right away because it's " + contentHint);
|
||||
Log.w(TAG, "[" + envelope.getTimestamp() + "] Inserting an error right away because it's " + contentHint, true);
|
||||
SignalDatabase.sms().insertBadDecryptMessage(sender.getId(), senderDevice, envelope.getTimestamp(), receivedTimestamp, threadId);
|
||||
break;
|
||||
case RESENDABLE:
|
||||
Log.w(TAG, "[" + envelope.getTimestamp() + "] Inserting into pending retries store because it's " + contentHint);
|
||||
Log.w(TAG, "[" + envelope.getTimestamp() + "] Inserting into pending retries store because it's " + contentHint, true);
|
||||
ApplicationDependencies.getPendingRetryReceiptCache().insert(sender.getId(), senderDevice, envelope.getTimestamp(), receivedTimestamp, threadId);
|
||||
ApplicationDependencies.getPendingRetryReceiptManager().scheduleIfNecessary();
|
||||
break;
|
||||
case IMPLICIT:
|
||||
Log.w(TAG, "[" + envelope.getTimestamp() + "] Not inserting any error because it's " + contentHint);
|
||||
Log.w(TAG, "[" + envelope.getTimestamp() + "] Not inserting any error because it's " + contentHint, true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue