1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2024-12-27 21:35:41 +00:00

Log when redirecting to the error page.

This commit is contained in:
King_DuckZ 2017-05-16 21:52:48 +01:00
parent 700dcc3049
commit e77b9dafbb

View file

@ -190,6 +190,10 @@ namespace tawashi {
} }
void SubmitPasteResponse::error_redirect (int parCode, ErrorReasons parReason) { void SubmitPasteResponse::error_redirect (int parCode, ErrorReasons parReason) {
auto statuslog = spdlog::get("statuslog");
assert(statuslog);
statuslog->info("Redirecting to error page, code={} reason={}", parCode, parReason);
std::ostringstream oss; std::ostringstream oss;
oss << base_uri() << "/error.cgi?code=" << parCode << "&reason=" << parReason._to_integral(); oss << base_uri() << "/error.cgi?code=" << parCode << "&reason=" << parReason._to_integral();
this->change_type(Response::Location, oss.str()); this->change_type(Response::Location, oss.str());