1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 09:39:39 +02:00

SMACK-534 Refactored all System.out/err and printStackTrace calls with appropriate Java util logging calls.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_4_0@13887 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
rcollier 2014-02-02 22:39:07 +00:00
parent 9bb940da4b
commit 1b651d4939
30 changed files with 189 additions and 183 deletions

View file

@ -33,6 +33,8 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jivesoftware.smack.Connection;
import org.jivesoftware.smack.PacketCollector;
@ -85,6 +87,8 @@ import org.jivesoftware.smack.util.StringUtils;
* @author Kirill Maximov (kir@maxkir.com)
*/
public class VCard extends IQ {
private static Logger log = Logger.getLogger(VCard.class.getName());
private static final String DEFAULT_MIME_TYPE = "image/jpeg";
/**
@ -332,7 +336,7 @@ public class VCard extends IQ {
bytes = getBytes(avatarURL);
}
catch (IOException e) {
e.printStackTrace();
log.log(Level.SEVERE, "Error getting bytes from URL: " + avatarURL, e);
}
setAvatar(bytes);
@ -489,7 +493,7 @@ public class VCard extends IQ {
digest = MessageDigest.getInstance("SHA-1");
}
catch (NoSuchAlgorithmException e) {
e.printStackTrace();
log.log(Level.SEVERE, "Failed to get message digest", e);
return null;
}
@ -582,7 +586,7 @@ public class VCard extends IQ {
result = (VCard) packet;
}
catch (ClassCastException e) {
System.out.println("No VCard for " + user);
log.log(Level.SEVERE, "No VCard for " + user, e);
return;
}