Skip to content

Commit 44cdf05

Browse files
committed
renamed callack to log
1 parent e9b8c43 commit 44cdf05

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/App.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ struct TemplatedApp {
147147
return std::move(static_cast<TemplatedApp &&>(*this));
148148
}
149149

150-
/* Attaches an error handler for internal HTTP parsing errors */
151-
TemplatedApp &&onHttpParsingError(MoveOnlyFunction<void(HttpRequest *, int, std::string_view)> &&errorHandler) {
152-
httpContext->onHttpParsingError(std::move(errorHandler));
150+
/* Attaches a log handler for HTTP parsing errors */
151+
TemplatedApp &&log(MoveOnlyFunction<void(HttpRequest *, int, std::string_view)> &&logHandler) {
152+
httpContext->log(std::move(logHandler));
153153

154154
return std::move(static_cast<TemplatedApp &&>(*this));
155155
}

src/HttpContext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ struct HttpContext {
442442
}
443443

444444
/* Register an HTTP parsing error handler */
445-
void onHttpParsingError(MoveOnlyFunction<void(HttpRequest *, int, std::string_view)> &&errorHandler) {
446-
getSocketContextData()->httpParsingErrorHandler = std::move(errorHandler);
445+
void log(MoveOnlyFunction<void(HttpRequest *, int, std::string_view)> &&logHandler) {
446+
getSocketContextData()->httpParsingErrorHandler = std::move(logHandler);
447447
}
448448

449449
/* Register an HTTP route handler acording to URL pattern */

0 commit comments

Comments
 (0)