adding option to set the DB name#205
Conversation
| const dbUrl = process.env.USER_WINSTON_MONGODB_URL | ||
| ||process.env.WINSTON_MONGODB_URL||'mongodb://localhost:27017/winston'; | ||
| const dbName = process.env.WINSTON_MONGODB_DBNAME | ||
| ||'otherWinston'; |
There was a problem hiding this comment.
What's the reasoning behind 'otherWinston' here?
There was a problem hiding this comment.
Just an example database name for the test. So checking the results there should be two databases logged to 'winston' and 'otherWinston'.
|
Do you think this is finished, tested, and good to merge? |
Yes, it is finished. I have tested it using the unit tests from this project, and I also tried it out in my app using a npm package link and it is working as expected. |
|
On second note, I don't have permission to do a release of this on npm, and that might be for the better as I don't currently use the mongodb transport in any of my own projects. I don't know if there are other project maintainers who can give it a good look with testing and merge, but on a quick review of the code the PR seems reasonable to me. |
|
Okay no problem, are you able to request one of the maintainers to take a look? |
|
I don't actually know who all has that permission on this project. |
|
Looking through the git history, it looks like @yurijmikhalevich has the access. Yuri, are you able to provide a review on this one? |
DABH
left a comment
There was a problem hiding this comment.
LGTM (I think I can merge and release on npm…)
Adding support for using a different DB name than the default one from the connection URI.
The use case is to allow users to use log with a pre-connected mongo client, but use a different name than the default.