fix test shell with debug
This commit is contained in:
@@ -615,7 +615,7 @@ void KafkaSendThread::run()
|
||||
debugList.pop_front(); // ֻ<>зǿհ<C7BF><D5B0>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>Ż<EFBFBD><C5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&errorListMutex);
|
||||
pthread_mutex_unlock(&debugListMutex);
|
||||
}
|
||||
else if (normalOutputEnabled) {
|
||||
// <20><><EFBFBD><EFBFBD> normalOutputEnabled Ϊ 1<><31><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD> normalList <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
||||
@@ -1538,42 +1538,32 @@ void parse_log(const std::string& json_str) {
|
||||
else if (level == "WARN"){
|
||||
// <20><><EFBFBD>ø澯<C3B8><E6BEAF><EFBFBD><EFBFBD>
|
||||
redirectWarnOutput(true);
|
||||
redirectErrorOutput(true);
|
||||
}
|
||||
else if (level == "NORMAL"){
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>
|
||||
redirectNormalOutput(true);
|
||||
redirectErrorOutput(true);
|
||||
redirectWarnOutput(true);
|
||||
}
|
||||
else if (level == "DEBUG"){
|
||||
// <20><><EFBFBD><EFBFBD> debug (ֻ<>浽 debugList<73><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>ն<EFBFBD>)
|
||||
redirectDebugOutput(true);
|
||||
redirectErrorOutput(true);
|
||||
redirectWarnOutput(true);
|
||||
redirectNormalOutput(true);
|
||||
}
|
||||
else{
|
||||
std::cout << "level error" <<std::endl;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (level == "ERROR"){
|
||||
// <20>رմ<D8B1><D5B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
redirectErrorOutput(false);
|
||||
}
|
||||
else if (level == "WARN"){
|
||||
// <20><><EFBFBD>ø澯<C3B8><E6BEAF><EFBFBD><EFBFBD>
|
||||
redirectWarnOutput(false);
|
||||
}
|
||||
else if (level == "NORMAL"){
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>
|
||||
redirectNormalOutput(false);
|
||||
}
|
||||
else if (level == "DEBUG"){
|
||||
redirectDebugOutput(false);
|
||||
}
|
||||
else{
|
||||
redirectDebugOutput(false);
|
||||
redirectErrorOutput(false);
|
||||
redirectWarnOutput(false);
|
||||
redirectNormalOutput(false);
|
||||
std::cout << "close all log" <<std::endl;
|
||||
}
|
||||
|
||||
redirectDebugOutput(false);
|
||||
redirectErrorOutput(false);
|
||||
redirectWarnOutput(false);
|
||||
redirectNormalOutput(false);
|
||||
std::cout << "close all log" <<std::endl;
|
||||
}
|
||||
}
|
||||
else{
|
||||
@@ -2843,6 +2833,9 @@ int try_start_mqtest_thread(int argc, char *argv[])
|
||||
mqtestThrd.start();
|
||||
mqtest_thread_created = 1;
|
||||
}*/
|
||||
//<2F><>װqt<71><74>ӡ
|
||||
qInstallMsgHandler(myQtMsgHandler);
|
||||
|
||||
QCoreApplication a(argc, argv);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> QThread <20><> Worker <20><><EFBFBD><EFBFBD>
|
||||
|
||||
@@ -140,6 +140,8 @@ public slots:
|
||||
return; // <20><>ֹ<EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
}
|
||||
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> QTcpServer <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD><C5BA><EFBFBD><EFBFBD><EFBFBD>
|
||||
server = new QTcpServer(this);
|
||||
connect(server, SIGNAL(newConnection()), this, SLOT(onNewConnection()));
|
||||
@@ -241,7 +243,7 @@ private slots:
|
||||
std::cout << "Received 'q' from shell socket! Exiting viewlog...\n";
|
||||
if (activeClient == clientSocket) {
|
||||
stopViewLog = true; // ? <20><> `viewlog` <20>˳<EFBFBD>
|
||||
showinshellflag = false;
|
||||
|
||||
clientSocket->write("\nLog view stopped. Returning to shell.\n> ");
|
||||
clientSocket->flush();
|
||||
}
|
||||
@@ -334,7 +336,7 @@ private:
|
||||
helpText += "log - Execute rocketmq_test_log\n";
|
||||
helpText += "ledger <id> - Execute ledger with optional terminal_id\n";
|
||||
helpText += "viewlog <level> - View logs (ERROR, WARN, NORMAL, DEBUG)\n";
|
||||
helpText += "value <valuename> - Execute value print with valuename : iedcount frontfun frontindex remtable\n";
|
||||
helpText += "value <valuename> - Execute value print with valuename : iedcount frontfun frontindex remtable log\n";
|
||||
helpText += "exit - Exit the shell\n";
|
||||
helpText += "help - Show this help message\n";
|
||||
clientSocket->write(helpText.toUtf8());
|
||||
|
||||
Reference in New Issue
Block a user