Skip to content

Commit

Permalink
Merge pull request #41 from kkuzmin/verbose_log
Browse files Browse the repository at this point in the history
Add more verbose logging.
  • Loading branch information
kkuzmin authored May 23, 2018
2 parents efb45f0 + 4faab6a commit 702b893
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions lib/o365_mgmnt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
* @end
* -----------------------------------------------------------------------------
*/


const util = require('util');

const m_alUtil = require('../al_util');
const m_o365mgmnt = require('./o365management');

Expand Down Expand Up @@ -106,7 +108,9 @@ var _subscriptionsStart = function(contentType, webhook, callback) {
function(error, result, httpRequest, response) {
let retError = error;
if (error)
retError = `O365 subscriptions/start ${error}`;
retError = util.format(
'O365 subscriptions/start error. ContentType = %s, webhook = %j, error = %j',
contentType, webhook, error);
return callback(retError, result, httpRequest, response);
});
};
Expand All @@ -133,7 +137,9 @@ var _subscriptionsStop = function(contentType, callback) {
function(error, result, httpRequest, response) {
let retError = error;
if (error)
retError = `O365 subscriptions/stop ${error}`;
retError = util.format(
'O365 subscriptions/stop error. ContentType = %s, error = %j',
contentType, error);
return callback(retError, result, httpRequest, response);
});
};
Expand Down Expand Up @@ -162,7 +168,9 @@ var _subscriptionsContent = function(contentType, startTs, endTs, callback) {
function(error, result, httpRequest, response) {
let retError = error;
if (error)
retError = `O365 subscriptions/content ${error}`;
retError = util.format(
'O365 subscriptions/content error. ContentType = %s, startTs = %j, endTs = %j, error = %j',
contentType, startTs, endTs, error);
return callback(retError, result, httpRequest, response);
});
};
Expand Down Expand Up @@ -191,7 +199,9 @@ var _subscriptionsNotifications = function(contentType, startTs, endTs, callback
function(error, result, httpRequest, response) {
let retError = error;
if (error)
retError = `O365 subscriptions/notifications ${error}`;
retError = util.format(
'O365 subscriptions/notifications error. ContentType = %s, startTs = %j, endTs = %j, error = %j',
contentType, startTs, endTs, error);
return callback(retError, result, httpRequest, response);
});
};
Expand All @@ -217,7 +227,9 @@ var _getContent = function(contentUri, callback) {
function(error, result, httpRequest, response) {
let retError = error;
if (error)
retError = `O365 fetch content ${error}`;
retError = util.format(
'O365 fetch content error. uri = %s, error = %j',
contentUri, error);
return callback(retError, result, httpRequest, response);
});
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "azure_collector",
"version": "1.0.7",
"version": "1.0.8",
"dependencies": {
"async": "*",
"azure": "^2.0.0-preview",
Expand Down

0 comments on commit 702b893

Please sign in to comment.