OCT 1. 修正打印日志导致进程异常问题

This commit is contained in:
黄昕 2023-08-24 17:46:48 +08:00
parent ef058012e6
commit 933c653a18
2 changed files with 2 additions and 5 deletions

View File

@ -380,9 +380,6 @@ template<class T1, class T2> int PlatformProtolPostMessage(const TCHAR *pUrlPath
if (res.error() != httplib::Error::Success) {
SPDLOG_ERROR(TEXT("[{0}]:Post Data {1} error: {2}"), pUrlPath, pJson, httplib::to_string(res.error()));
if(res.error() != httplib::Error::Connection) {
SPDLOG_DEBUG(TEXT("+++++ Http Request {0}\n---- Http Response {1}"), pJson, res->body.c_str());
}
free(pJson);
return -ERR_HTTP_POST_DATA;
}

View File

@ -53,7 +53,7 @@ static void InitTunnelSDKLog(const TCHAR *pLogFile, LOG_LEVEL level) {
TCHAR tmpPath[MAX_PATH];
if (pLogFile && strlen(pLogFile) > 0) {
if (PathIsRelative(buf)) {
if (PathIsRelative(pLogFile)) {
StringCbPrintf(buf, MAX_PATH, TEXT("%s\\%s"), g_globalConfig.workDirectory, pLogFile);
} else {
StringCbCopy(buf, MAX_PATH, pLogFile);