Skip to content

Commit

Permalink
Proofread
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Dec 29, 2023
1 parent e76ca84 commit 51ee6dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/logging-to-elmah-io-from-httpclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class HttpClientLogger : IHttpClientLogger
}
```

The `HttpClientLogger` class implements that `IHttpClientLogger` interface. Three hooks are provided as part of this interface: request starting, request stopping, request failed. In the code above, we create a single `Information` message when a response is received and a single `Error` message in case of an error. By using structured properties like `{method}` and `{statusCode}` we make sure that elmah.io show these pieces of data in the right fields. The format and wording of each log message can be tailored to your preference.
The `HttpClientLogger` class implements the `IHttpClientLogger` interface. Three hooks are provided as part of this interface: request starting, request stopping, and request failing. In the code above, we create a single `Information` message when a response is received and a single `Error` message in case of an error. By using structured properties like `{method}` and `{statusCode}` we make sure that elmah.io shows these pieces of data in the right fields. The format and wording of each log message can be tailored to your preference.

Registering the custom logger can be done like this:

Expand Down

0 comments on commit 51ee6dc

Please sign in to comment.