Update index.js
This commit is contained in:
7
index.js
7
index.js
@@ -23,14 +23,9 @@ function print(msg, err) {
|
|||||||
|
|
||||||
var timestamp = "[" + h + ":" + m + ":" + s + "]";
|
var timestamp = "[" + h + ":" + m + ":" + s + "]";
|
||||||
console.log(timestamp, msg);
|
console.log(timestamp, msg);
|
||||||
|
|
||||||
newLog = {time: timestamp, message: msg};
|
|
||||||
logs.push(newLog);
|
|
||||||
|
|
||||||
if(err) {
|
if(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
errLog = {time: timestamp, message: err};
|
|
||||||
logs.push(errLog);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user