运行日志加载编码统一,解决windows环境下日志乱码问题;

v1.7
xueli.xue 8 years ago
parent dccb0eca2f
commit 7765ef51dd

@ -121,7 +121,8 @@ public class XxlJobFileAppender {
int toLineNum = 0; int toLineNum = 0;
LineNumberReader reader = null; LineNumberReader reader = null;
try { try {
reader = new LineNumberReader(new FileReader(logFile)); //reader = new LineNumberReader(new FileReader(logFile));
reader = new LineNumberReader(new InputStreamReader(new FileInputStream(logFile), "utf-8"));
String line = null; String line = null;
while ((line = reader.readLine())!=null) { while ((line = reader.readLine())!=null) {

Loading…
Cancel
Save