Here you can find the source of log(String fmt, Object... args)
public static void log(String fmt, Object... args)
//package com.java2s; //License from project: Open Source License import java.io.FileWriter; import java.io.IOException; public class Main { private static FileWriter fw; public static void log(String fmt, Object... args) { try {/*w w w . j a v a 2s .com*/ if (fw == null) { fw = new FileWriter("client.log.txt"); } fw.append(String.format("%-4d %s\n", System.currentTimeMillis() % 10000, String.format(fmt, args))); fw.flush(); } catch (IOException e) { throw new RuntimeException(e); } } }