-
Notifications
You must be signed in to change notification settings - Fork 67
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(logging): custom log entries MONGOSH-1989 #2322
base: main
Are you sure you want to change the base?
Conversation
bus.emit('mongosh:connect', { | ||
uri: 'mongodb://localhost/', | ||
is_localhost: true, | ||
is_atlas: false, | ||
resolved_hostname: 'localhost', | ||
node_version: 'v12.19.0', | ||
}); |
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 sorry if this is silly, but as someone who's not super proficient with the mongosh testing harness, it's not clear to me why we need this as part of this test. Is it used to test that non-custom logs are still emitted or for some other reason?
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.
Yes, that is exactly the reason to check that all of those records are located in the same log file and the custom log is not being saved separately to keep the ordered log entries in one place to provide a clear picture for debugging.
Allow users to add custom entries to mongosh logs in their scripts.
The custom log message will sequentially appear alongside internal mongosh messages, and will look similar to this: