ppkarwasz commented on PR #3322: URL: https://github.com/apache/logging-log4j2/pull/3322#issuecomment-2561740658
@jesmith17, Thank you for your contribution. While I am not a MongoDB user, the current behavior of using the connection string to infer the name of the database and collection does not make sense to me. Your proposal looks like a valid improvement. According to the [MongoDB connection string documentation](https://www.mongodb.com/docs/manual/reference/connection-string/#standard-connection-string-format) the connection string has the form: ``` mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]] ``` where `defaultauthdb` is documented as: > The authentication database to use if the connection string includes `username:password@` authentication credentials but the [authSource](https://www.mongodb.com/docs/manual/reference/connection-string-options/#mongodb-urioption-urioption.authSource) option is unspecified. Therefore: - `defaultauthdb` does not seem to be the right value to be used as database name to store the logs: I imagine that some MongoDB installation might use a different database for authentication and to store the data, right? - the collection name does not even appear in the official connection string. It only appears in the Java-specific [`ConnectionString`](https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-core/com/mongodb/ConnectionString.html) class. I guess that many users don't know that syntax. @garydgregory, what do you think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org