Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/megaads-vn/nodejs-megalogger-client


https://github.com/megaads-vn/nodejs-megalogger-client

Last synced: 10 days ago
JSON representation

Awesome Lists containing this project

README

        

# nodejs megalogger client

##Installation:
```
npm install megalogger
```

##Usage:

```javascript
var Megalogger = require('megalogger');

// your apiKey
var apiKey = 'asefas_efjhj-afsd64sf';
var source = 'Your source';
var initData = {
apiKey: apiKey,
source: source
};
// Log
var dataLog = {title: "This is title", body: "Message test"};

// level for log include: info, debug, warning, error, critical
var level = 'info';

// init instance of class Megalogger
var logger = new Megalogger(initData);

// push log
logger.log(dataLog, level);

```