printErrLogs function
Implementation
Future printErrLogs(
Request req,
Response resp,
HTTPException e,
ErrHandler next,
) async {
var dateTime = DateTime.now();
var result = await next(req, resp, e);
print("[$dateTime] ${req.client?.remoteAddress.host} "
"${req.method} ${req.uri.path} => ${resp.nativeStatus}");
return result;
}