diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-11-20 22:41:30 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2015-11-20 22:41:30 +0100 |
commit | 2531c88f2c8a992aa0c40c9f96e88099dc94139e (patch) | |
tree | e3815b7f1ef0bbd227df8c4452d4aa52b54830e4 /src/main/java/de/thedevstack/conversationsplus/services/MessageArchiveService.java | |
parent | 8838a5094812e0540ccfef3334e49e1a5c1a564b (diff) |
Implements FS#67: Introduce central logging class to use log prefix, new activity to show logcat output and button to copy contents
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/services/MessageArchiveService.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/services/MessageArchiveService.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/MessageArchiveService.java b/src/main/java/de/thedevstack/conversationsplus/services/MessageArchiveService.java index 2b8ed579..eee81b90 100644 --- a/src/main/java/de/thedevstack/conversationsplus/services/MessageArchiveService.java +++ b/src/main/java/de/thedevstack/conversationsplus/services/MessageArchiveService.java @@ -1,6 +1,6 @@ package de.thedevstack.conversationsplus.services; -import android.util.Log; +import de.thedevstack.conversationsplus.utils.Logging; import java.math.BigInteger; import java.util.ArrayList; @@ -106,13 +106,13 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded { private void execute(final Query query) { final Account account= query.getAccount(); if (account.getStatus() == Account.State.ONLINE) { - Log.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": running mam query " + query.toString()); + Logging.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": running mam query " + query.toString()); IqPacket packet = this.mXmppConnectionService.getIqGenerator().queryMessageArchiveManagement(query); this.mXmppConnectionService.sendIqPacket(account, packet, new OnIqPacketReceived() { @Override public void onIqPacketReceived(Account account, IqPacket packet) { if (packet.getType() == IqPacket.TYPE.ERROR) { - Log.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": error executing mam: " + packet.toString()); + Logging.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": error executing mam: " + packet.toString()); finalizeQuery(query); } } @@ -182,7 +182,7 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded { boolean abort = (query.getStart() == 0 && query.getTotalCount() >= Config.PAGE_SIZE) || query.getTotalCount() >= Config.MAM_MAX_MESSAGES; if (complete || relevant == null || abort) { this.finalizeQuery(query); - Log.d(Config.LOGTAG,query.getAccount().getJid().toBareJid().toString()+": finished mam after "+query.getTotalCount()+" messages"); + Logging.d(Config.LOGTAG,query.getAccount().getJid().toBareJid().toString()+": finished mam after "+query.getTotalCount()+" messages"); } else { final Query nextQuery; if (query.getPagingOrder() == PagingOrder.NORMAL) { |