1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +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

@ -20,18 +20,21 @@
package org.jivesoftware.smack.parsing;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Simple parsing exception callback that only logs the encountered parsing exception to stderr.
* Simple parsing exception callback that only logs the encountered parsing exception to java util logging.
*
* @author Florian Schmaus
*
*/
public class ExceptionLoggingCallback extends ParsingExceptionCallback {
private static Logger log = Logger.getLogger(ExceptionLoggingCallback.class.getName());
@Override
public void handleUnparsablePacket(UnparsablePacket unparsed) throws Exception {
System.err.print("Smack message parsing exception: " + unparsed.getParsingException().getMessage());
unparsed.getParsingException().printStackTrace();
System.err.println("Unparsed content: " + unparsed.getContent());
log.log(Level.SEVERE, "Smack message parsing exception: ", unparsed.getParsingException());
log.severe("Unparsed content: " + unparsed.getContent());
}
}