node-babylog

1.0.0 • Public • Published

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);

Readme

Keywords

Package Sidebar

Install

npm i node-babylog

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lcornita