swift-server / swift-server/async-http-client

logging pretty broken: debug Logger only ever logs `Request was queued (waiting for a connection to become available)`

Open
#796 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
1.1k
Forks
156
PR merge metrics
No merged PRs in 30d

Description

I'm firing off some requests and I'm passing execute(..., logger: logger) with logger being configured to debug. Unfortunately, the only logs I can see are

2024-12-18T15:36:24+0000 debug mm : ahc-request-id=9 [AsyncHTTPClient] Request was queued (waiting for a connection to become available)
2024-12-18T15:36:24+0000 debug mm : ahc-request-id=1 [AsyncHTTPClient] Request was queued (waiting for a connection to become available)
2024-12-18T15:36:24+0000 debug mm : ahc-request-id=2 [AsyncHTTPClient] Request was queued (waiting for a connection to become available)
2024-12-18T15:36:24+0000 debug mm : ahc-request-id=8 [AsyncHTTPClient] Request was queued (waiting for a connection to become available)
2024-12-18T15:36:24+0000 debug mm : ahc-request-id=4 [AsyncHTTPClient] Request was queued (waiting for a connection to become available)
2024-12-18T15:36:24+0000 debug mm : ahc-request-id=10 [AsyncHTTPClient] Request was queued (waiting for a connection to become available)
2024-12-18T15:36:24+0000 debug mm : ahc-request-id=16 [AsyncHTTPClient] Request was queued (waiting for a connection to become available)
2024-12-18T15:36:24+0000 debug mm : ahc-request-id=5 [AsyncHTTPClient] Request was queued (waiting for a connection to become available)
2024-12-18T15:36:24+0000 debug mm : ahc-request-id=3 [AsyncHTTPClient] Request was queued (waiting for a connection to become available)

nothing ever gets logged until we're done. Pretty sure that AHC is losing the Logger somewhere.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the execute(..., logger: logger) case described in the report, then trace how the logger is passed through the request lifecycle. Done means debug logging continues after requests leave the queue and remains available until the requests complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.