Merge pull request #75 from gradido/save_response_to_logs

make response.html better accessible
This commit is contained in:
Ulf Gebhardt 2021-03-24 17:52:30 +01:00 committed by GitHub
commit 9389112a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,7 +227,13 @@ int SigningTransaction::run() {
//printf("[JsonRequestHandler::handleRequest] Exception: %s\n", ex.displayText().data());
addError(new ParamError("SigningTransaction", "error parsing request answer", ex.displayText().data()));
FILE* f = fopen("response.html", "wt");
std::string log_Path = "/var/log/grd_login/";
//#ifdef _WIN32
#if defined(_WIN32) || defined(_WIN64)
log_Path = "./";
#endif
log_Path += "response.html";
FILE* f = fopen(log_Path.data(), "wt");
if (f) {
std::string responseString = responseStringStream.str();
fwrite(responseString.data(), 1, responseString.size(), f);