重构了与DB的交互逻辑,以及与任务\上位机指令的消息,使用新的loguru库进行日志管理

This commit is contained in:
zjk
2025-04-20 22:42:28 +08:00
parent c5e28cee54
commit 06226b6704
35 changed files with 5430 additions and 175 deletions
+6 -3
View File
@@ -10,11 +10,16 @@
#include "ColorParse.h"
#include "PowerManger.h"
#include "PowerManger_Info.h"
#include "loguru.hpp"
using namespace std;
int main(int argc, char *argv[])
{
// 初始化loguru
loguru::init(argc, argv);
loguru::add_file("pPowerManger.log", loguru::Append, loguru::Verbosity_MAX);
string mission_file;
string run_command = argv[0];
@@ -39,9 +44,7 @@ int main(int argc, char *argv[])
if(mission_file == "")
showHelpAndExit();
cout << termColor("green");
cout << "pPowerManger launching as " << run_command << endl;
cout << termColor() << endl;
LOG_F(INFO, "pPowerManger launching as %s", run_command.c_str());
PowerManger PowerManger;