I currently have some error handling middleware in my API pipeline. I'm about to add a logging middleware. The goal will be to log all incoming requests and outgoing responses, along with logging any errors that occur.
Is this possible and in startup.cs does the logging middleware go before the error handling or vice versa?