adding a timestamp
This commit is contained in:
parent
958e544024
commit
fd3ebb914f
@ -16,6 +16,7 @@
|
||||
"cookie-parser": "^1.4.1",
|
||||
"ejs": "^2.4.1",
|
||||
"express": "^4.13.4",
|
||||
"googleapis": "^15.0.0",
|
||||
"markdown": "^0.5.0",
|
||||
"morgan": "^1.7.0",
|
||||
"nano": "^6.2.0",
|
||||
|
@ -43,7 +43,8 @@ var dbCloudant = cloudant.db.use(credentials.database);
|
||||
function insertLog(obj) {
|
||||
logger.debug('Inserting into couch...');
|
||||
logger.info(util.inspect(obj));
|
||||
var newObj = {body:obj};
|
||||
var ts = new Date();
|
||||
var newObj = {body:obj, timestamp:ts};
|
||||
dbCloudant.insert(newObj, function(err, body,header) {
|
||||
if (err) {
|
||||
logger.error('Error inserting into couch');
|
||||
|
Loading…
Reference in New Issue
Block a user