package saccubus.conv;
import java.io.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.xml.sax.*;
import javax.xml.parsers.*;
* @version 1.0
*/
public class ConvertToVideoHook {
+
+ private static final Logger logger = Logger.getLogger(ConvertToVideoHook.class.getName());
+
public static boolean convert(File file, File out, String ng_id,
String ng_word) {
try {
try {
nico_reader = new NicoXMLReader(packet, ng_id, ng_word);
} catch (java.util.regex.PatternSyntaxException e) {
- e.printStackTrace();
+ logger.log(Level.SEVERE, null, e);
return false;
}
if (nico_reader != null) {
fos.close();
return true;
} catch (IOException ex) {
- ex.printStackTrace();
+ logger.log(Level.SEVERE, null, ex);
} catch (SAXException ex) {
- ex.printStackTrace();
+ logger.log(Level.SEVERE, null, ex);
} catch (ParserConfigurationException ex) {
- ex.printStackTrace();
+ logger.log(Level.SEVERE, null, ex);
}
return false;
}