-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add server detection based on host names during MongoClient construct… #1214
Conversation
@@ -52,6 +58,7 @@ | |||
*/ | |||
@SuppressWarnings("deprecation") | |||
public final class DefaultClusterFactory { | |||
private static final Logger LOGGER = Loggers.getLogger("DefaultClusterFactory"); |
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.
There is a specification for structured logging messages that ensures consistent logging within drivers. However, since those log messages do not adhere to any specification, the regular approach to logging is being used.
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.
Ack
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.
Looks really good. I only have a couple of optional nits.
LGTM
driver-core/src/main/com/mongodb/internal/connection/DefaultClusterFactory.java
Outdated
Show resolved
Hide resolved
driver-core/src/main/com/mongodb/internal/connection/DefaultClusterFactory.java
Outdated
Show resolved
Hide resolved
@@ -52,6 +58,7 @@ | |||
*/ | |||
@SuppressWarnings("deprecation") | |||
public final class DefaultClusterFactory { | |||
private static final Logger LOGGER = Loggers.getLogger("DefaultClusterFactory"); |
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.
Ack
- Inline method. JAVA-5089
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
This PR introduces cluster type detection during MongoClient construction, triggering informative logs for CosmosDB, and DocumentDB (so far). Messages guide users to external support resources.