mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Update logging/metric system
This commit is contained in:
@@ -70,11 +70,11 @@ describe('debug node', function() {
|
||||
try {
|
||||
helper.log().called.should.be.true;
|
||||
var logEvents = helper.log().args.filter(function(evt) {
|
||||
return evt[0].level == "info";
|
||||
return evt[0].type == "debug";
|
||||
});
|
||||
logEvents.should.have.length(1);
|
||||
var tstmp = logEvents[0][0].timestamp;
|
||||
logEvents[0][0].should.eql({level:'info',id:'n1',type:'debug',msg:'test', timestamp:tstmp});
|
||||
logEvents[0][0].should.eql({level:helper.log().INFO, id:'n1',type:'debug',msg:'test', timestamp:tstmp});
|
||||
|
||||
done();
|
||||
} catch(err) {
|
||||
|
@@ -139,11 +139,11 @@ describe('function node', function() {
|
||||
try {
|
||||
helper.log().called.should.be.true;
|
||||
var logEvents = helper.log().args.filter(function(evt) {
|
||||
return evt[0].level == "error";
|
||||
return evt[0].type == "function";
|
||||
});
|
||||
logEvents.should.have.length(1);
|
||||
var msg = logEvents[0][0];
|
||||
msg.should.have.property('level', 'error');
|
||||
msg.should.have.property('level', helper.log().ERROR);
|
||||
msg.should.have.property('id', 'n1');
|
||||
msg.should.have.property('type', 'function');
|
||||
msg.should.have.property('msg', 'ReferenceError: retunr is not defined');
|
||||
|
Reference in New Issue
Block a user