fix(server): 使用 logger 记录所有日志
This commit is contained in:
@@ -22,7 +22,7 @@ public class Bootstrap {
|
|||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
if (initDefaultFile()) {
|
if (initDefaultFile()) {
|
||||||
System.out.println("请重新启动该程序.");
|
LOGGER.info("请重新启动该程序.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ServerConfig.init();
|
ServerConfig.init();
|
||||||
@@ -56,7 +56,7 @@ public class Bootstrap {
|
|||||||
throw new IOException("log4j2.xml 文件损坏!");
|
throw new IOException("log4j2.xml 文件损坏!");
|
||||||
}
|
}
|
||||||
Files.copy(stream, log4jFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
Files.copy(stream, log4jFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||||
System.out.println("已生成默认 log4j2.xml 文件!");
|
LOGGER.info("已生成默认 log4j2.xml 文件!");
|
||||||
saved = true;
|
saved = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ public class Bootstrap {
|
|||||||
throw new IOException("config.yml 文件损坏!");
|
throw new IOException("config.yml 文件损坏!");
|
||||||
}
|
}
|
||||||
Files.copy(stream, configFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
Files.copy(stream, configFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||||
System.out.println("已生成默认 config.yml 文件!");
|
LOGGER.info("已生成默认 config.yml 文件!");
|
||||||
saved = true;
|
saved = true;
|
||||||
}
|
}
|
||||||
return saved;
|
return saved;
|
||||||
|
Reference in New Issue
Block a user