mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 04:11:06 -05:00
Log HTTP errors when verbose logging is enabled
This commit is contained in:
@@ -102,6 +102,11 @@ bool MacroActionHttp::PerformAction()
|
||||
break;
|
||||
}
|
||||
|
||||
if (VerboseLoggingEnabled() && !response) {
|
||||
blog(LOG_INFO, "HTTP action error: %s",
|
||||
httplib::to_string(response.error()).c_str());
|
||||
}
|
||||
|
||||
SetTempVarValue("status",
|
||||
response ? std::to_string(response->status) : "");
|
||||
SetTempVarValue("body", response ? response->body : "");
|
||||
@@ -140,6 +145,7 @@ static std::string stringListToString(const StringList &list)
|
||||
result += std::string(string) + ", ";
|
||||
}
|
||||
result.pop_back();
|
||||
result.pop_back();
|
||||
return result + "]";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user