Skip to content
Permalink
Browse files

Added more detailed logging for mongodb errors

  • Loading branch information...
silvae86 committed Jul 12, 2018
1 parent f688e75 commit e3b723be82a2e68d1d2a0d02e696beb617b41de1
Showing with 32 additions and 31 deletions.
  1. +28 −28 package-lock.json
  2. +3 −2 src/kb/cache/cache.js
  3. +1 −1 src/kb/cache/caches/mongodb.js

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -59,8 +59,9 @@ Cache.initConnections = function (callback)
{
if (!isNull(err))
{
Logger.log("warn", "Unable to connect to MongoDB cache service with ID : " + mongoDBConnection.id + " running on " + mongoDBConnection.host + ":" + mongoDBConnection.port)
Logger.log("warn", JSON.stringify(mongoCacheConfig, null, 4));
Logger.log("warn", "Unable to connect to MongoDB cache service!!");
Logger.log("warn", "Mongodb connection Error: " + JSON.stringify(err, null, 4));
Logger.log("warn", "Mongodb connection Returned Object: " + JSON.stringify(mongoDBConnection, null, 4));
callback(err);
}
else
@@ -184,7 +184,7 @@ MongoDBCache.prototype.getByQuery = function (query, callback)
{
if (!isNull(query))
{
const cursor = self.client.collection(self.collection).find(query).sort({"ddr.modified": -1 });
const cursor = self.client.collection(self.collection).find(query).sort({ "ddr.modified": -1 });

cursor.next(function (err, result)
{

0 comments on commit e3b723b

Please sign in to comment.
You can’t perform that action at this time.