clean up logging

This commit is contained in:
Daniel Gultsch 2019-08-14 18:44:57 +02:00
parent 195988398e
commit c039ffcf35
2 changed files with 4 additions and 7 deletions

View file

@ -428,11 +428,11 @@ public class XmppConnectionService extends Service {
final int next = connection.getTimeToNextAttempt();
final boolean lowPingTimeoutMode = isInLowPingTimeoutMode(account);
if (next <= 0) {
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. reconnecting now. lowPingTimeout=" + Boolean.toString(lowPingTimeoutMode));
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. reconnecting now. lowPingTimeout=" + lowPingTimeoutMode);
reconnectAccount(account, true, false);
} else {
final int attempt = connection.getAttempt() + 1;
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. try again in " + next + "s for the " + attempt + " time. lowPingTimeout=" + Boolean.toString(lowPingTimeoutMode));
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. try again in " + next + "s for the " + attempt + " time. lowPingTimeout=" + lowPingTimeoutMode);
scheduleWakeUpCall(next, account.getUuid().hashCode());
}
}
@ -1522,7 +1522,6 @@ public class XmppConnectionService extends Service {
packet.addChild(ChatState.toElement(conversation.getOutgoingChatState()));
}
}
Log.d(Config.LOGTAG,packet.toString());
sendMessagePacket(account, packet);
}
}

View file

@ -1328,11 +1328,9 @@ public class XmppConnection implements Runnable {
throw new IOException();
} else if (streamError.hasChild("host-unknown")) {
throw new StateChangingException(Account.State.HOST_UNKNOWN);
} else if (streamError.hasChild("policy-violation")) { ;
} else if (streamError.hasChild("policy-violation")) {
final String text = streamError.findChildContent("text");
if (text != null) {
Log.d(Config.LOGTAG,account.getJid().asBareJid()+": policy violation. "+text);
}
Log.d(Config.LOGTAG,account.getJid().asBareJid()+": policy violation. "+text);
throw new StateChangingException(Account.State.POLICY_VIOLATION);
} else {
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": stream error " + streamError.toString());