You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
801 B

package com.util;
/**
* <EFBFBD><EFBFBD>־
*/
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
public class Log {
public void addLog(String str){
try {
File file=new File("c://log.txt");
FileWriter fw=new FileWriter(file,true);
BufferedWriter bw=new BufferedWriter(fw);
PrintWriter pw = new PrintWriter(bw);
pw.write(str);
bw.newLine();//<2F><><EFBFBD><EFBFBD>
bw.flush();//<2F><><EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD><DDB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
pw.close();
fw.close();//<2F>ر<EFBFBD><D8B1>ļ<EFBFBD><C4BC><EFBFBD>
} catch (FileNotFoundException e) {
System.out.println("<22><><EFBFBD><EFBFBD><E6A3BA>־<EFBFBD>ļ<EFBFBD>û<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
e.printStackTrace();
} catch (IOException e) {
System.out.println("<22><><EFBFBD><EFBFBD><E6A3BA>־<EFBFBD>ļ<EFBFBD>IO<49><4F><EFBFBD>󣡣<EFBFBD><F3A3A1A3><EFBFBD><EFBFBD><EFBFBD>");
e.printStackTrace();
}
}
}