GT2/GT2-iOS/node_modules/logfmt/examples/timed_log.js

20 lines
430 B
JavaScript
Raw Normal View History

2018-02-12 17:26:06 +00:00
var logfmt = require('../logfmt');
var logger = logfmt.time('thing')
logger.log({foo: 'bar'})
var this_thing = function(){
logfmt.log({at: "logfmt log"})
logger.log({at: "thing"})
var inner_logger = logger.time()
var inner_thing = function(){
logfmt.log({at: "logfmt log"})
logger.log({at: "thing"})
inner_logger.log({at: 'inner thing'});
}
setTimeout(inner_thing, 100);
}
setTimeout(this_thing, 300);