# mcap-logger

> Connect a logger against the mCAP Logger REST API with node

Latest version **0.1.4** (published 2015-07-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install mcap-logger
pnpm add mcap-logger
yarn add mcap-logger
bun add mcap-logger
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2015-07-09 |
| First published | 2014-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 (+8 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mwaylabs |
| Maintainers | mwaylabs |

## Links

- npm: https://www.npmjs.com/package/mcap-logger
- Repository: https://github.com/mwaylabs/mcap-logger
- Issues: https://github.com/mwaylabs/mcap-logger/issues
- npm.io page: https://npm.io/package/mcap-logger

## Dependencies (8)

- [q](https://npm.io/package/q.md) ^2.0.3
- [debug](https://npm.io/package/debug.md) ^1.0.4
- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [verror](https://npm.io/package/verror.md) ^1.4.0
- [request](https://npm.io/package/request.md) ^2.40.0
- [archiver](https://npm.io/package/archiver.md) ^0.11.0
- [node-formdata](https://npm.io/package/node-formdata.md) ^0.1.5
- [fstream-ignore](https://npm.io/package/fstream-ignore.md) ^1.0.1

## Recent versions

- 0.1.4 (latest) — 2015-07-09
- 0.1.3 — 2014-12-17
- 0.1.2 — 2014-12-17
- 0.1.1 — 2014-12-17
- 0.1.0 — 2014-12-16
- 0.0.0 — 2014-08-19

## README

# 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
```

---
_Source: https://npm.io/package/mcap-logger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
