ashleydavis / mongodb-rest

REST Server for MongoDB (using node.js)
GNU Lesser General Public License v3.0
75 stars 34 forks source link

TypeError: logger.warning is not a function #28

Open rajbht opened 6 years ago

rajbht commented 6 years ago

Getting the following exception when I try to GET /db-

Using auth: {} in config for my mongodb connection, and it looks like auth.js has logger.warning instead of logger.warn. Even having config.logger = "error" in config.json didn't help.

TypeError:` logger.warning is not a function
    at Layer.handle (/usr/local/lib/node_modules/mongodb-rest/lib/auth.js:38:20)
    at trim_prefix (/usr/local/lib/node_modules/mongodb-rest/node_modules/express/lib/router/index.js:254:17)
    at /usr/local/lib/node_modules/mongodb-rest/node_modules/express/lib/router/index.js:216:9
    at Function.proto.process_params (/usr/local/lib/node_modules/mongodb-rest/node_modules/express/lib/router/index.js:286:12)
    at next (/usr/local/lib/node_modules/mongodb-rest/node_modules/express/lib/router/index.js:207:19)
    at next (/usr/local/lib/node_modules/mongodb-rest/node_modules/express/lib/router/index.js:182:38)
    at Layer.handle (/usr/local/lib/node_modules/mongodb-rest/lib/accesscontrol.js:36:11)
    at trim_prefix (/usr/local/lib/node_modules/mongodb-rest/node_modules/express/lib/router/index.js:254:17)
    at /usr/local/lib/node_modules/mongodb-rest/node_modules/express/lib/router/index.js:216:9
    at Function.proto.process_params (/usr/local/lib/node_modules/mongodb-rest/node_modules/express/lib/router/index.js:286:12)

I am not sure if anyone is resolving these issues, but just wanted to post it, incase someone else saw this similar issue.