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

Unable to log to database with authentication #34

Open
phber opened this issue Nov 12, 2015 · 0 comments
Open

Unable to log to database with authentication #34

phber opened this issue Nov 12, 2015 · 0 comments

Comments

@phber
Copy link

phber commented Nov 12, 2015

It seems to be possible to specify the log database using the connection string:

  mongodb://localhost/mydb

according to documentation:

    /// If no database specified, default to "log4net"

However, this is not consistent with the official MongoDb connection string:

/database
Optional. The name of the database to authenticate if the connection string includes authentication credentials in the form of username:password@. If /database is not specified and the connection string includes credentials, the driver will authenticate to the admin database.

This leads to an error when trying to add credentials to the connection string:
mongodb://user:password@localhost/mydb

When using this syntax, the logger is unable to write anything to the database. It seems like the database now is being interpreted as the authentication database according to the official MongoDb standard.

It should be possible to both specify the logging database as well as the authentication database.

@phber phber changed the title Error reading custom database in connection string Unable to log to database with authentication Nov 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants