import java.io.FileOutputStream;
import java.io.IOException;
/备用将日志写入文本中/
public class WriteData2txt {
public static void main(String[] arg) throws IOException {
logfile(“lisi”);
}
public static boolean logfile(String tableName) throws IOException {
boolean flag = false;
byte[] buff = new byte[]{};
if (tableName!=null) {
String message = “表:”" + tableName +"“创建失败:” + “表名中含有无效标识符!” + “\r\n”;
buff = message.getBytes();
FileOutputStream out = new FileOutputStream(“D://ErrorLog.txt”, true);
out.write(buff);
flag = true;
}
return flag;
}
}