Skip to content

Commit e277c8d

Browse files
committed
Make Task.logger accessible to delegate implementations outside of Package
Motivation: This change was proposed in issue [#389](#389). Users writing their own `HttpClientResponseDelegate` implementation might want to emit log messages to the `task`'s `logger`. Modifications: Changed the access level of `Task`'s `logger` property from `internal` to `public`. Result: Users can access the `logger` property of a `Task` outside of the `async-http-client`.
1 parent 2442598 commit e277c8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/AsyncHTTPClient/HTTPHandler.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,9 @@ extension HTTPClient {
565565
public final class Task<Response> {
566566
/// The `EventLoop` the delegate will be executed on.
567567
public let eventLoop: EventLoop
568+
public let logger: Logger // We are okay to store the logger here because a Task is for only one request.
568569

569570
let promise: EventLoopPromise<Response>
570-
let logger: Logger // We are okay to store the logger here because a Task is for only one request.
571571

572572
var isCancelled: Bool {
573573
self.lock.withLock { self._isCancelled }

0 commit comments

Comments
 (0)