Skip to content
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-4849): Add Typescript support for log path in client options #3886

Merged
merged 11 commits into from
Oct 23, 2023

Conversation

aditi-khare-mongoDB
Copy link
Contributor

@aditi-khare-mongoDB aditi-khare-mongoDB commented Oct 10, 2023

Description

mongodbLogPath is now a supported option in client options through connection string or through the MongoClient constructor

mongodbLogPath is the path for logging results to be written to.

  • For a client created through a MongoClient constructor, it can be 'stdout', 'stderr' or a stream of the MongoDBLogWritable type (any stream with a write method).
  • For client created through a connection string, it can be 'stdout', 'stderr'

This feature is currently flagged as internal until Logging is released.

What is changing?

Internally, we can provide a log path to a connection string or to the MongoClient constructor specifying where to output logs.

MongoClient Constructor Example:

const client = new MongoClient('mongodb://localhost:27017',  {  mongodbLogPath: 'stdout'  });

ConnectionString Example:

const client = new MongoClient('mongodb://localhost?mongodbLogPath=stdout');
Is there new documentation needed for these changes?

Yes, documentation for MongoClient options and connection string options should be updated with updated logging information.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

Sorry, something went wrong.

@aditi-khare-mongoDB aditi-khare-mongoDB force-pushed the NODE-4849/log-path-client-options branch from 8416dee to d24e549 Compare October 11, 2023 19:16
@aditi-khare-mongoDB aditi-khare-mongoDB changed the title Node 4849/log path client options feat(Node 4849): Add typescript support for log path in client options Oct 11, 2023
@aditi-khare-mongoDB aditi-khare-mongoDB changed the title feat(Node 4849): Add typescript support for log path in client options feat(Node 4849): Add Typescript support for log path in client options Oct 11, 2023
@aditi-khare-mongoDB aditi-khare-mongoDB marked this pull request as ready for review October 11, 2023 21:42
@dariakp dariakp changed the title feat(Node 4849): Add Typescript support for log path in client options feat(NODE-4849): Add Typescript support for log path in client options Oct 11, 2023
Copy link
Contributor

@dariakp dariakp left a comment

Choose a reason for hiding this comment

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

It doesn't look like this PR is actually ready for review, so I am moving it back to draft. @aditi-khare-mongoDB Please make sure that any new PR stays in draft until it's actually ready for review.

@dariakp dariakp marked this pull request as draft October 11, 2023 22:31
@aditi-khare-mongoDB aditi-khare-mongoDB marked this pull request as ready for review October 16, 2023 19:32
@durran durran self-assigned this Oct 17, 2023
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Oct 17, 2023
durran
durran previously approved these changes Oct 20, 2023
@durran durran added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Oct 20, 2023
@durran durran merged commit f495abb into main Oct 23, 2023
@durran durran deleted the NODE-4849/log-path-client-options branch October 23, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants