1.0.0 • Published 10 years ago
node-babylog v1.0.0
Babylog - NodeJS Adaptor
Installation
npm install git+<git_ssh_or_https_uri>Usage
var babylog = babylog.getNewInstance({
"token" : "<your_usage_token>",
"host" : "<babylog_host>",
"port" : "<babylog_port>",
"log" : "<winston_log_level|false>", //defaults to false
"app" : "BabylogAPI"
});
babylog.capture();
[..]
babylog.endCapture();Info
babylog.info("This is an info message");Debug
babylog.info("This is a debug message");Warning
babylog.info("This is a warning message");Error
babylog.info("This is an error message");Fatal
babylog.info("This is a fatal message");Task
var t1,
iteration = 0;
t1 = babylog.createTask("t1", "First task");
setInterval(function () {
if (10 === iteration) {
t1.end();
return false;
}
t1.feed("Some realtime async data feed is going here.");
iteration ++;
}, 1000);1.0.0
10 years ago