Skip to content

Commit

Permalink
adding back in removed logger
Browse files Browse the repository at this point in the history
  • Loading branch information
JackLewis-digirati committed Jul 11, 2023
1 parent e18c09e commit ba1bb5d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/RequestLogger/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@

// gets the customer id from a path like somePath/customer/<customer id>/somePath
var customerId = TryGetCustomerId(context);

var requestLoggerService = scoped.ServiceProvider.GetRequiredService<IRequestLoggerService>();

// converts query string into a dictionary (if it has values)
var queryStringDictionary = BuildQueryStringDictionary(context);
Expand All @@ -94,10 +96,12 @@
RequestTime = DateTime.UtcNow
};

await SendResponse(request, context);
var requestCompleted = await requestLoggerService.WriteLogMessage(request);

await SendResponse(requestCompleted, context);
});

async Task SendResponse(Request request, HttpContext httpContext)
async Task SendResponse(Request? request, HttpContext httpContext)
{
try
{
Expand Down

0 comments on commit ba1bb5d

Please sign in to comment.