Skip to content

Commit da7f237

Browse files
committed
add docs for logtag
1 parent d799ddb commit da7f237

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

docs/src/client.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ When a non-2XX HTTP status code is received in a response, this is meant to conv
107107

108108
If `true`, `HTTP.StatusError`, `HTTP.TimeoutError`, `HTTP.IOError`, and `HTTP.ConnectError` will be logged via `@error` as they happen, regardless of whether the request is then retried or not. Useful for debugging or monitoring requests where there's worry of certain errors happening but ignored because of retries.
109109

110+
### `logtag`
111+
112+
If provided, will be used as the tag for error logging. Useful for debugging or monitoring requests.
113+
110114
### `observelayers`
111115

112116
If `true`, enables the `HTTP.observelayer` to wrap each client-side "layer" to track the amount of time spent in each layer as a request is processed. This can be useful for debugging performance issues. Note that when retries or redirects happen, the time spent in each layer is cumulative, as noted by the `[layer]_count`. The metrics are stored in the `Request.context` dictionary, and can be accessed like `HTTP.get(...).request.context`.

src/HTTP.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Supported optional keyword arguments:
158158
- `logerrors = false`, if `true`, `HTTP.StatusError`, `HTTP.TimeoutError`, `HTTP.IOError`, and `HTTP.ConnectError` will be
159159
logged via `@error` as they happen, regardless of whether the request is then retried or not. Useful for debugging or
160160
monitoring requests where there's worry of certain errors happening but ignored because of retries.
161+
- `logtag = nothing`, if provided, will be used as the tag for error logging. Useful for debugging or monitoring requests.
161162
- `observelayers = false`, if `true`, enables the `HTTP.observelayer` to wrap each client-side "layer" to track the amount of
162163
time spent in each layer as a request is processed. This can be useful for debugging performance issues. Note that when retries
163164
or redirects happen, the time spent in each layer is cumulative, as noted by the `[layer]_count`. The metrics are stored

0 commit comments

Comments
 (0)