OSDN Git Service

System.out.print* メソッドを削除
[coroid/inqubus.git] / frontend / src / saccubus / converter / FfmpegCommand.java
index da8641a..2ba38db 100644 (file)
@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import org.apache.commons.lang.StringUtils;
 import saccubus.ConvertStopFlag;
 import saccubus.conv.ConvertToVideoHook;
@@ -27,7 +29,7 @@ import yukihane.swf.Cws2Fws;
  * @author yuki
  */
 public class FfmpegCommand extends AbstractCommand {
-
+    private static final Logger logger = Logger.getLogger(FfmpegCommand.class.getName());
     private final File commentMiddleFile;
     private final File tcommMiddleFile;
     private final File TMP_CWS;
@@ -161,14 +163,15 @@ public class FfmpegCommand extends AbstractCommand {
 
         cmdList.add(convertedVideoFile.getPath());
 
-        System.out.print("arg:");
+        final StringBuilder argMsg = new StringBuilder();
+        argMsg.append("arg:");
         for (String s : cmdList) {
-            System.out.print(" " + s);
+            argMsg.append(" ").append(s);
         }
-        System.out.println();
+        logger.log(Level.INFO, argMsg.toString());
 
         try {
-            System.out.println("\n\n----\nProcessing FFmpeg...\n----\n\n");
+            logger.log(Level.INFO, "\n\n----\nProcessing FFmpeg...\n----\n\n");
             Process process = Runtime.getRuntime().exec(cmdList.toArray(new String[0]));
             BufferedReader ebr = new BufferedReader(new InputStreamReader(
                     process.getErrorStream()));
@@ -178,7 +181,7 @@ public class FfmpegCommand extends AbstractCommand {
                 if (state.startsWith("frame=")) {
                     sendText(state);
                 } else if (!state.endsWith("No accelerated colorspace conversion found")) {
-                    System.out.println(e);
+                    logger.log(Level.INFO, e);
                 }
 
                 try {