Skip to content

Propagate ILoggerFactory through BiDi sessions, frames and realms - #3547

Merged
kblok merged 1 commit into
masterfrom
implement-upstream-change-logger-25.6.0
Aug 11, 2026
Merged

kblok merged 1 commit into
masterfrom
implement-upstream-change-logger-25.6.0

Conversation

@kblok

@kblok kblok commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Ports the logger work from Puppeteer v25.6.0 to PuppeteerSharp.

Upstream added a pluggable Logger and then threaded it through constructors so classes stop reaching for an ambient/global logger. PuppeteerSharp already exposes the equivalent capability through ILoggerFactory on LaunchOptions/ConnectOptions, so no new parallel logging API was introduced — instead this PR closes the actual propagation gaps on the BiDi side.

Changes

  • Propagate the user-supplied ILoggerFactory down into BiDi types that previously had no logger: BidiCdpSession, BidiFrame, BidiFrameRealm, BidiWorkerRealm, BidiRealm.
  • Replace leftover Console.WriteLine / TODO-style logging in BiDi realms with proper ILogger calls.
  • Add null-logger fallbacks so classes constructed without a factory keep working.
  • Expose the logger factory from Frame for derived types.

Upstream

Verification

  • Build passes
  • Targeted launch/connect tests: 3 passed, 1 skipped, 0 failed

Port the relevant logger plumbing from upstream Puppeteer PRs #15324, #15297 and #15302 using PuppeteerSharp's existing ILoggerFactory API instead of adding a parallel logger abstraction. Ensure BiDi frame sessions and realms always receive the configured logger factory, replace the remaining ambient console/TODO logging in BiDi realm cleanup with ILogger, and provide null logger fallbacks for frames and BiDi CDP sessions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@kblok kblok changed the title Implement upstream logger PRs #15324, #15297, #15302 Propagate ILoggerFactory through BiDi sessions, frames and realms Aug 11, 2026
@kblok kblok mentioned this pull request Aug 11, 2026
@kblok
kblok merged commit 0bd9807 into master Aug 11, 2026
27 of 28 checks passed
@kblok
kblok deleted the implement-upstream-change-logger-25.6.0 branch August 11, 2026 17:26
sondresjolyst pushed a commit to sondresjolyst/garge-api that referenced this pull request Aug 24, 2026
Updated [PuppeteerSharp](https://github.com/hardkoded/puppeteer-sharp)
from 25.5.0 to 25.7.0.

<details>
<summary>Release notes</summary>

_Sourced from [PuppeteerSharp's
releases](https://github.com/hardkoded/puppeteer-sharp/releases)._

## 25.7.0

## What's Changed
* fix: roll Firefox to 153.0.4 by @​kblok in
hardkoded/puppeteer-sharp#3554
* docs: clarify CdpHttpRequest owns its logger (upstream #​15338 N/A) by
@​kblok in hardkoded/puppeteer-sharp#3552
* feat(tracing): support BufferSize option in Tracing.StartAsync by
@​kblok in hardkoded/puppeteer-sharp#3551
* refactor: track CDP listeners with DisposableActionsStack by @​kblok
in hardkoded/puppeteer-sharp#3555
* feat: roll Chrome to 152.0.7977.42 by @​kblok in
hardkoded/puppeteer-sharp#3553
* Bump version to 25.7.0 by @​kblok in
hardkoded/puppeteer-sharp#3556


**Full Changelog**:
hardkoded/puppeteer-sharp@v25.6.0...v25.7.0

## 25.6.0

## What's Changed
* Replace hand-rolled retry/timeout plumbing with RxSharp by @​kblok in
hardkoded/puppeteer-sharp#3520
* Roll browsers: Chrome 151.0.7922.77, Firefox 153.0.3 by @​kblok in
hardkoded/puppeteer-sharp#3546
* Propagate ILoggerFactory through BiDi sessions, frames and realms by
@​kblok in hardkoded/puppeteer-sharp#3547
* Default BidiRealm logger to NullLogger by @​kblok in
hardkoded/puppeteer-sharp#3550
* Don't fail per-frame CDP fan-out when an OOP iframe goes away by
@​kblok in hardkoded/puppeteer-sharp#3548


**Full Changelog**:
hardkoded/puppeteer-sharp@v25.5.0...v25.6.0

Commits viewable in [compare
view](hardkoded/puppeteer-sharp@v25.5.0...v25.7.0).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=PuppeteerSharp&package-manager=nuget&previous-version=25.5.0&new-version=25.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant