重构了与DB的交互逻辑,以及与任务\上位机指令的消息,使用新的loguru库进行日志管理
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user