Skip to content

DOCSP-47063: Logging #267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: comp-cov
Choose a base branch
from

Conversation

norareidy
Copy link
Collaborator

@norareidy norareidy commented Jun 10, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-47063

Staging Links

  • monitoring-logging/logging
  • monitoring-logging
  • Self-Review Checklist

    • Is this free of any warnings or errors in the RST?
    • Did you run a spell-check?
    • Did you run a grammar-check?
    • Are all the links working?
    • Are the facets and meta keywords accurate?
    • Are the page titles greater than 20 characters long and SEO relevant?
    • Did you add redirects?

    Copy link

    netlify bot commented Jun 10, 2025

    Deploy Preview for docs-php-library ready!

    Name Link
    🔨 Latest commit 7decdd4
    🔍 Latest deploy log https://app.netlify.com/projects/docs-php-library/deploys/684854277389b10008a254c3
    😎 Deploy Preview https://deploy-preview-267--docs-php-library.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify project configuration.

    Copy link
    Collaborator

    @rustagir rustagir left a comment

    Choose a reason for hiding this comment

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

    mostly looks good, happy to take another look if needed!

    in your cluster configuration
    - :ref:`Logging <php-logging>`: Configure logging to receive messages
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    S: theres a missing bullet point here for Change streams (out of scope but you can add)

    Comment on lines +28 to +29
    The {+library-short+} supports `Psr\\Log\\LoggerInterface
    <https://www.php-fig.org/psr/psr-3/#3-psrlogloggerinterface>`__, a PSR-3
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    S: consider linking to the general page instead of an anchor

    - Creates a logger called ``MyLogger`` that extends the ``AbstractLogger`` class
    and records the log level, description, and domain of each event
    - Registers the logger
    - Creates a client that connects to a CosmosDB cluster
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    S: I'm guessing that you are connecting to this cluster because it will generate an info message, but perhaps you should ping Rishabh to ask if we want to demonstrate this as an example

    )

    The preceding output includes log messages with a ``debug`` severity level, which
    describe normal driver activities. It also includes a message about the CosmosDB
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    S: to resolve the vale issue you could use a phrase like "These messages provide updates on the state of the connection" as normal is subjective

    (
    [0] => debug
    [1] => Setting driver handshake data: { name: 'ext-mongodb:PHP / PHPLIB ', version: '1.21.0 / 1.21.1 ', platform: 'PHP 8.4.4 ' }
    [2] => PHONGO
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    Q: What is PHONGO? might be worth describing what types of things users might expect to see here

    Comment on lines +193 to +195
    To learn more about C driver logging behavior, see `Logging
    <https://mongoc.org/libmongoc/current/logging.html>`__ in the ``libmongoc``
    API documentation.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    Suggested change
    To learn more about C driver logging behavior, see `Logging
    <https://mongoc.org/libmongoc/current/logging.html>`__ in the ``libmongoc``
    API documentation.
    To learn more about how the underlying C driver generates log messages, see `Logging
    <https://mongoc.org/libmongoc/current/logging.html>`__ in the ``libmongoc``
    API documentation.

    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.

    2 participants