package org.jivesoftware.smack.parsing;

import java.util.logging.Level;
import java.util.logging.Logger;

public class ExceptionLoggingCallback extends ParsingExceptionCallback {
   private static final Logger LOGGER = Logger.getLogger(ExceptionLoggingCallback.class.getName());

   public void handleUnparsablePacket(UnparsablePacket unparsed) throws Exception {
      LOGGER.log(Level.SEVERE, "Smack message parsing exception: ", unparsed.getParsingException());
      LOGGER.severe("Unparsed content: " + unparsed.getContent());
   }
}
