Skip to content

Use the configured logger for pages and locators - #83

Merged
smnandre merged 3 commits into
playwright-php:mainfrom
gimler:feature/logger
Nov 7, 2026
Merged

smnandre merged 3 commits into
playwright-php:mainfrom
gimler:feature/logger

Conversation

@gimler

@gimler gimler commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

Use PlaywrightConfig::logger for page and locator diagnostics, including locators inside frames. Log native locator failures and redact sensitive values from navigation URLs and error details.

Comment thread src/Browser/BrowserContext.php Resolved
@gimler
gimler force-pushed the feature/logger branch 2 times, most recently from b0cda81 to 20216ca Compare March 5, 2026 09:07
@codecov

codecov Bot commented Mar 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread src/Page/Page.php
private readonly string $pageId,
private readonly PlaywrightConfig $config,
private readonly LoggerInterface $logger = new NullLogger(),
?LoggerInterface $logger = null,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would remove it from here and use only the one from config, and in confing spawn the null one by default.

Comment thread src/Page/Page.php Resolved
Comment thread src/Page/Page.php Resolved
@kbond kbond changed the title Feature/logger Use the configured logger for pages and locators Nov 7, 2026

@smnandre smnandre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @gimler !

@smnandre
smnandre merged commit 39a34a8 into playwright-php:main Nov 7, 2026
10 checks passed
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.

4 participants