logRequest()function
Log a Request to the console.
logRequest(request: Request): void
Three thin wrappers around console.log/console.error that format HTTP Request and Response objects with ANSI arrow decorators. Intended for server-side request logging in development and production.
import { logRequest, logRequestResponse, logRequestError } from "shelving/util";
// Log an incoming request (arrow pointing right →).
await logRequest(request);
// Log the response alongside its originating request (arrow pointing left ←).
await logRequestResponse(response, request);
// Log an error that occurred while handling a request (failure marker).
logRequestError(error, request);Log a Request to the console.
logRequest(request: Request): void
Log a Response to a Request to the console.
logRequestResponse(response: Response, request: Request): Promise<void>
Log an Error from a Request to the console.
logRequestError(reason: unknown, request: Request): void