Skip to content

Fix: make sure that remote proxy sessions's logs can be silenced when the wrangler log level is set to "none"#12498

Merged
vicb merged 2 commits intomainfrom
dario/allow-none-log-level-for-startRemoteProxySession
Feb 10, 2026
Merged

Fix: make sure that remote proxy sessions's logs can be silenced when the wrangler log level is set to "none"#12498
vicb merged 2 commits intomainfrom
dario/allow-none-log-level-for-startRemoteProxySession

Conversation

@dario-piotrowicz
Copy link
Member

@dario-piotrowicz dario-piotrowicz commented Feb 9, 2026


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
      • @vicb validated that the changes here work as expected, we're still discussing whether this change should test-covered
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bugfix

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2026

🦋 Changeset detected

Latest commit: c0f38e4

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@claude
Copy link
Contributor

claude bot commented Feb 9, 2026

Claude finished @dario-piotrowicz's task —— View job


Changeset Review

⚠️ Issues found

The changeset at .changeset/every-dolls-type.md has the following issue:

Description Quality: The changeset description is too brief and doesn't provide enough context for users reading the changelog. According to the guidelines, you should "aim for more than one sentence but less than three paragraphs to keep it succinct and useful."

Current changeset:

Fix: make sure that remote proxy sessions's logs can be silenced when the wrangler log level is set to "none"

This is just the title without a body. A better changeset would explain:

  • What the symptom was (logs appearing when log level was "none")
  • What context this affects (remote proxy sessions specifically)
  • Any relevant context for users

Suggested improvement:

---
"wrangler": patch
---

Fix remote proxy sessions logs not respecting "none" log level

Previously, when the wrangler log level was set to "none", remote proxy sessions would still output logs. This has been fixed so that setting the log level to "none" now properly silences all remote proxy session logs.

Other validations:

  • ✅ Version type: patch is correct for a bug fix
  • ✅ No h1/h2/h3 markdown headers used
  • ✅ Not an analytics change
  • ✅ Not a dependabot PR
  • ✅ Not an experimental feature

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 9, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12498

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12498

miniflare

npm i https://pkg.pr.new/miniflare@12498

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12498

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12498

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12498

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12498

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12498

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12498

wrangler

npm i https://pkg.pr.new/wrangler@12498

commit: c0f38e4

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @dario-piotrowicz !

Could you please add a test?

Comment on lines +49 to +55
// If the logger has a logLevel of "debug" it means that the user is likely trying to debug some issue,
// so we should respect that here as well for the remote proxy session. In any other case, to avoid noisy
// so we should respect that here as well for the remote proxy session. If the logLevel is "none" the user
// is trying to fully silence logs and we should respect that. In any other case, to avoid noisy
// logs, we just simply fall back to "error"
logger.loggerLevel === "debug" ? "debug" : "error",
logger.loggerLevel === "debug" || logger.loggerLevel === "none"
? logger.loggerLevel
: "error",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot Dario, that does the trick.

I guess we should extra this code block?

/** JSDoc */
function getLevel(parentLevel: LoggerLevel) {
  switch (parentLevel) {
    case "debug":
      // blabla debug
      return "debug";

    case "none":
      // blabla none
      return "none";

    default:
      // blabla error
      return "error";
  }
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this look ok? c0f38e4

@dario-piotrowicz
Copy link
Member Author

Could you please add a test?

I'd avoid that if possible, not having test coverage is not ideal but adding tests for this would increase test run times and potential introduce flakiness, given the fact that this is such a small change I personally feel that the cons of adding a test for this would outweigh the benefits.

We also didn't include tests for a related fix back when: #11242

@vicb
Copy link
Contributor

vicb commented Feb 10, 2026

I'd avoid that if possible, not having test coverage is not ideal but adding tests for this would increase test run times and potential introduce flakiness

Ask Claude given this constraints?
Ultimately ok to not add a test for now if we create an issue to follow up on that

We also didn't include tests for a related fix back when: #11242

I think that's my point here...

@dario-piotrowicz
Copy link
Member Author

Ultimately ok to not add a test for now if we create an issue to follow up on that

What I was suggesting was not to avoid adding a test now and follow up later, but not planning to add a test at all. The implementation complexity here is not significant, what the problem is that these type of tests that require a remote connection are the slowest and flakiest that we have, so unless really beneficial I think we should avoid adding more of these (and I don't see a very high value in such a test here).

@vicb
Copy link
Contributor

vicb commented Feb 10, 2026

what the problem is that these type of tests that require a remote connection are the slowest and flakiest that we have

Would they require a remote connection?
I mean we can mock the slow parts that we don't need to test, no?

@dario-piotrowicz
Copy link
Member Author

what the problem is that these type of tests that require a remote connection are the slowest and flakiest that we have

Would they require a remote connection? I mean we can mock the slow parts that we don't need to test, no?

I'm not 100% sure, I can look into that, but I think that it would be so heavily mocked that it would be even less valuable (and at that point it also would be a much more complex piece of testing code that needs maintaining)

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Dario

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Feb 10, 2026
@dario-piotrowicz dario-piotrowicz marked this pull request as ready for review February 10, 2026 13:00
@dario-piotrowicz dario-piotrowicz requested a review from a team as a code owner February 10, 2026 13:00
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@vicb vicb merged commit 734792a into main Feb 10, 2026
40 of 43 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Feb 10, 2026
@vicb vicb deleted the dario/allow-none-log-level-for-startRemoteProxySession branch February 10, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants