🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

mcap-logger

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcap-logger

Connect a logger against the mCAP Logger REST API with node

latest
Source
npmnpm
Version
0.1.4
Version published
Maintainers
1
Created
Source

mCAP Logger

Connect a logger against the mCAP Logger REST API with node

Example

var Logger = require('mcap-logger');

var logger = new Logger({
    auth: {
        'user': '<USER>',
        'pass': '<PASS>'
    },
    baseUrl: '<SERVER URL>'
});

logger.watch({
    name: 'javascript.applications.3785733C-B873-4D43-AC88-8CB5C38407EA'
}).then(function(){
    console.log('succ registered watcher');
}, function(){
    console.log('error');
});

// callback when a log happend
logger.output = function(log){
    if (log) {
        Object.keys(log).forEach(function (l) {
            console.log(log[l].message);
        });
    }
};

// stop watching
logger.unwatch();

Test

npm test

or

mocha test

FAQs

Package last updated on 09 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts