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:
parent
700dcc3049
commit
e77b9dafbb
1 changed files with 4 additions and 0 deletions
|
@ -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());
|
||||||
|
|
Loading…
Reference in a new issue