/** ログ出力を指定したファイルに設定する. */ public static void setFile(String outfile) { try { if (outfile != null) { Log.outFile = outfile; Log.out = new PrintStream(new FileOutputStream(outfile)); } } catch (IOException e) { System.out.println("main: cannot open a logfile: " + outfile); System.exit(1); } }