-
Notifications
You must be signed in to change notification settings - Fork 264
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
PHPLIB-1243: Document add/remove logger functions #1191
Conversation
@@ -0,0 +1,11 @@ | |||
arg_name: param | |||
name: $logger | |||
type: Psr\\Log\\LoggerInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For "reasons", we can't use a URL here. I tried:
`Psr\Log\LoggerInterface <https://www.php-fig.org/psr/psr-3/#3-psrlogloggerinterface>`__
Giza complains about a leading backtick character. Text roles (e.g. :php:
) work, but we don't have one for the PSR website.
I was able to specify a URL when also using multi-line string syntax (e.g. type: |
), but that appends a trailing " or" to the output. I expect there's something in the build system that supports multiple types on separate lines -- which we've never used since we typically write "array|object".
Anyway, the PSR website is linked from the main doc page so this isn't a huge problem.
objects to receive log messages from libmongoc and the driver. Each registered | ||
logger will receive messages for *all* clients. | ||
|
||
Messages originating from libmongoc will have their log level translated to an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"libmongoc" is something for insiders. What do you think of the more abstract word "driver" or "extension".
Messages originating from libmongoc will have their log level translated to an | |
Messages originating from the mongodb extension will have their log level translated to an |
Reading this, I'd be interested to know what the mapping is, so that I know which types of messages I'm going to receive on which levels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually linking to the libmongoc docs below as that's the canonical reference for its log levels. Users are going to be exposed to libmongoc either way, as that's where the domain strings come from.
No objection changing this to the extension, though. This also relates to PHPLIB-1279.
This all makes we wish we could require users to complete a quick modal popup before landing on the docs and have them acknowledge that the "driver" consists of a PHP library, PHP extension, and libmongoc. It would use a cookie and attempt to be a one-time thing -- but that would probably land us in a quandary of then needing some silly GDPR cookie interstitial, which in my experience happens every time. Alas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's not confront European legislation and let readers learn at their own pace.
Thanks for the update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
objects to receive log messages from libmongoc and the driver. Each registered | ||
logger will receive messages for *all* clients. | ||
|
||
Messages originating from libmongoc will have their log level translated to an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's not confront European legislation and let readers learn at their own pace.
Thanks for the update.
https://jira.mongodb.org/browse/PHPLIB-1243