Skip to content

[logging] log playwright requests/responses #33

@pawelmhm

Description

@pawelmhm

It would be nice to log all playwright requests/responses going on when rendering a page, just for users to see what's going on when they think spider is hanging, not doing anything. Setting could be optional, doesn't have to be enabled by default, log messages could look exactly like scrapy ones, just with proper information that it is not scrapy request/response but playwright

2021-10-14 13:56:17 [playwright-firefox] DEBUG: browser received response (200) <GET https://www.propertyfinder.ae/en/search> (referer: None) 

This could help when debugging. On the other hand, it might add a lot of noise to logs, so it can be optional, not enabled by default.

You can do it in downloader handler by adding page.on("response"), page.on("request") handlers that will invoke log formatter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions