Adding Request Logging via Middleware

Learn how to perform request logging via middleware functions in a Deno application.

In this lesson, we’ll use the middleware we created previously and add logic to log what request is being made to the server.

Now that we have the logic to calculate the request timing we’ve built, we’re in a great place to add request logging to our application. The final goal is to have every request that is made to the application logged to the console with its path, HTTP method, and the time it took to answer. We’re looking for something like the following example:

Get hands-on with 1200+ tech skills courses.