-
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-5169): Implement emergency logger #3610
Conversation
…onfig feature flag and remove strict writable requirement for log sink in mongologger
test/integration/command-logging-and-monitoring/command_logging.test.ts
Outdated
Show resolved
Hide resolved
test/integration/command-logging-and-monitoring/command_logging.test.ts
Outdated
Show resolved
Hide resolved
src/constants.ts
Outdated
@@ -23,16 +23,27 @@ export const SERVER_DESCRIPTION_CHANGED = 'serverDescriptionChanged' as const; | |||
export const TOPOLOGY_OPENING = 'topologyOpening' as const; | |||
export const TOPOLOGY_CLOSED = 'topologyClosed' as const; | |||
export const TOPOLOGY_DESCRIPTION_CHANGED = 'topologyDescriptionChanged' as const; | |||
/** @public */ |
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.
we do we need to export our constants?
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.
This was done since the the name
property that we have on our Command Events and ConnectionPool Events is public so we need to have these constants exported. I'm open to doing this in a more elegant way.
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.
Well one option is to make the name
property on the command events internal. There's no reason it needs to be public, right? It's only used by the logger.
Description
What is changing?
MongoLogger.emergency
severity logger, the privateMongoLogger.log
method and related private helpersMongoLoggerMongoClientOptions.mongodbLogPath
to be aMongoDBLogWritable
ConnectionClosedEvent
's constructor now takes in an optional error that is used in the loggerCommandXXXXEvent
constructors works when the events are passed to the logger.Is there new documentation needed for these changes?
No
What is the motivation for this change?
Get initial implementation of one severity logging method complete to enable quick completion of the remainder of the logging methods
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript