-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(NODE-4878): Add remaining log configurable client options #3908
Conversation
a6ee6fa
to
8810c5f
Compare
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.
Can we also add a unit test for the mongodbLogMaxDocumentLength
?
Co-authored-by: Warren James <[email protected]>
Co-authored-by: Warren James <[email protected]>
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.
Current changes look good. Approval pending changing mongodbLogMaxDocumentLength
to number
and the surrounding code to treat it as an integer specifically from outcome of Slack thread.
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. Failures are unrelated
Co-authored-by: Warren James <[email protected]> Co-authored-by: Durran Jordan <[email protected]>
Description
mongodbLogComponentSeverities
andmongodbLogMaxDocumentLength
are now supported options in client options through the MongoClient constructor.Users can now provide severity levels for loggable components through the
MongoClient
constructor, as well as max document length for their logs.This feature is currently flagged as internal until Logging is released.
What is changing?
The user can provide component severities through clientOptions. If environment variables as well as client options are present, the client options will take precedence. If certain components are not specified in either, their severity level will default to the value of 'default.' If default is not specified, the severity level for all components will be 'off.'
These client options are only supported for the constructor, not for connection string.
Example:
Is there new documentation needed for these changes?
Yes, documentation for
MongoClient
options should be updated with updated logging information.Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript