43 lines
1.4 KiB
Java
43 lines
1.4 KiB
Java
import java.util.Date;
|
||
import cc.winboll.LogUtils;
|
||
import cc.winboll.test.ConsoleCmdAutoTest;
|
||
import cc.winboll.util.IniConfigUtils;
|
||
|
||
public class Main {
|
||
public static void main(String[] args) {
|
||
System.out.println("==== 程序启动 ====");
|
||
System.out.println("启动时间:" + new Date());
|
||
System.out.println("程序开始运行...");
|
||
try {
|
||
//if (!IniConfigUtils.loadConfig("/sdcard/WinBoLLStudio/Sources/AuthCenterConsoleApp/config/config.ini")) {
|
||
if (!IniConfigUtils.loadConfig(null)) {
|
||
System.out.println("INI配置文件加载失败,程序无法启动,强制退出");
|
||
System.exit(1);
|
||
}
|
||
|
||
try {
|
||
// 初始化日志工具,输出路径
|
||
System.out.println("\n【日志初始化】开始初始化日志工具...");
|
||
|
||
// 设置日志级别与日志输出目录
|
||
LogUtils.setGlobalLogLevel(java.util.logging.Level.ALL);
|
||
LogUtils.initLogDir("/sdcard/WinBoLLStudio/AuthCenterConsoleApp/logs");
|
||
LogUtils.i("Main", "日志工具初始化完成!");
|
||
|
||
// 执行自动化测试,传递启动参数
|
||
LogUtils.i("Main", "开始执行ConsoleCmdAutoTest自动化测试套件");
|
||
//ConsoleCmdAutoTest.main(args);
|
||
|
||
} finally {
|
||
LogUtils.i("Main", "测试执行完毕");
|
||
}
|
||
} catch (Exception e) {
|
||
System.out.println(String.format("%s", e));
|
||
}
|
||
|
||
System.out.println("\n==== 程序结束 ====");
|
||
System.out.println("结束时间:" + new Date());
|
||
}
|
||
}
|
||
|