# stream-log

> a tiny stream logger.

Latest version **0.2.3** (published 2014-11-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install stream-log
pnpm add stream-log
yarn add stream-log
bun add stream-log
```

## 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.2.3 |
| Published | 2014-11-06 |
| First published | 2014-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Maintainers | yields |

## Links

- npm: https://www.npmjs.com/package/stream-log
- Repository: https://github.com/yields/stream-log
- Issues: https://github.com/yields/stream-log/issues
- npm.io page: https://npm.io/package/stream-log

## Dependencies (1)

- [longest](https://npm.io/package/longest.md) ^0.2.1

## Recent versions

- 0.2.3 (latest) — 2014-11-06
- 0.2.2 — 2014-11-05
- 0.2.1 — 2014-10-24
- 0.2.0 — 2014-10-15
- 0.1.1 — 2014-10-07
- 0.1.0 — 2014-06-07
- 0.0.1 — 2014-06-07
- 0.0.0 — 2014-06-07

## README

## stream-log

  a tiny stream logger.

### Installation

```bash
$ npm install stream-log
```

### Example

![](https://i.cloudup.com/5MIi_cpbL1.png)

```js

var Logger = require('./');
var logger = new Logger(process.stderr);
var types = ['info', 'install', 'fetch', 'fetching'];
var times = 20;

types.forEach(function(type){
  logger.type(type, '36m');
});

logger.type('error', '31;1m', function(){
  logger.end();
  process.exit(1);
});

var i = setInterval(function(){
  var type = types[Math.random() * 4 | 0];
  --times && logger[type]('user/package@1.0.0');
  times || end();
}, 10)

function end(){
  clearInterval(i);
  logger.error(new Error('boom!').stack);
}

```

### License

  (MIT)

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