Here you can find the source of writeLog(String msg)
public static void writeLog(String msg)
//package com.java2s; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; public class Main { public static File logFile; public static void writeLog(String msg) { try {//www . j a v a2s . co m // if file doesnt exists, then create it if (!logFile.exists()) { logFile.createNewFile(); } FileWriter fw = new FileWriter(logFile.getAbsoluteFile(), true); BufferedWriter bw = new BufferedWriter(fw); bw.write(msg); bw.close(); } catch (Exception e) { } } }