Skip to content

Polish up logging #157

Description

@janbuchar

In the current state, we make a new logger in every module that needs to log something. There is CrawleeLogFormatter, which handles logging in the console.

  • our loggers should default to the "info" level
  • ??? the log format for Apify platform may be different (doesn't it ingest JSON? probably not, but I'm not sure)
  • in JS Crawlee, some classes accept loggers instead of creating them - we may want to revisit that
  • printing extra key-value information should now be possible via kwargs of logging.info and related methods - should we use that?

Activity

  1. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    on May 20, 2024
  2. vdusek commented on May 20, 2024

    @vdusek
    Collaborator

    Also, a question that comes to mind: do we want to override the default Python logger formatting? considering Crawlee is a library

  3. janbuchar commented on May 20, 2024

    @janbuchar
    CollaboratorAuthor

    Also, a question that comes to mind: do we want to override the default Python logger formatting? considering Crawlee is a library

    And also a framework... It is not unusual for frameworks to define their own loggers. But if a client wants to override that, we should make it easy.

  4. vdusek commented on Nov 21, 2025

    @vdusek
    Collaborator

    We should also review the debug logs to ensure they provide some value. Suppose a user switches from info to debug level. In that case, they should get some meaningful information (e.g., about sending this request, processing this response, storing this item into the dataset, ...) that could help them (currently it is quite random and maybe a bit of spam).

  5. self-assigned this
    on Nov 21, 2025
  6. added this to the 2.0 milestone on Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions