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-5672): support standardized logging #4387

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Jan 29, 2025

Description

What is changing?

  • remove feature flagging and make enabling the logger public 🎉
Is there new documentation needed for these changes?

Yes, API docs updated

What is the motivation for this change?

The long lost v3 logger hath returned, reborn a new, standardized, structured, and non-blocking. All shall love it and despair!

Release Highlight

MongoDB Standardized Logging 📝

The driver's standardized logger is now available! The primary goal of our driver's logger is to enable insight into database operations without code changes so the enablement and configuration of the logger are primarily done through or environment variables.

TL;DR Show me the logs!

env MONGODB_LOG_ALL=debug node server.mjs

A complete list of the environment variables, and details on how to set them can be found in the MongoDB manual here: https://www.mongodb.com/docs/drivers/node/current/fundamentals/logging

Tip

If you are a CLI app developer (or otherwise take great care of your std outputs): The client options constructor argument takes precedence over environment variables, permitting you to disable or otherwise customize the logger so your app does not automatically respond to the current environment.

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

@nbbeeken nbbeeken force-pushed the NODE-5672-release-logging branch 3 times, most recently from f020215 to a515dd7 Compare January 29, 2025 19:31
@nbbeeken nbbeeken force-pushed the NODE-5672-release-logging branch from a515dd7 to 07d41b8 Compare January 29, 2025 19:54
@nbbeeken nbbeeken marked this pull request as ready for review January 29, 2025 20:36
@dariakp dariakp requested a review from a team January 29, 2025 21:50
@durran durran self-assigned this Jan 30, 2025
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jan 30, 2025
@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 Jan 30, 2025
@durran durran merged commit d1b2453 into main Jan 30, 2025
28 of 30 checks passed
@durran durran deleted the NODE-5672-release-logging branch January 30, 2025 18:34
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.

2 participants