Skip to content

Unable to log to database with authentication #34

@phber

Description

@phber

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions