# resin-stream-logger

> Log streams and output in an easy and consistent fashion

Latest version **0.1.2** (published 2018-11-26) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install resin-stream-logger
pnpm add resin-stream-logger
yarn add resin-stream-logger
bun add resin-stream-logger
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2018-11-26 |
| First published | 2017-04-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 19.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Cameron Diver |
| Maintainers | balena.io, resin-ci, resin.io |

## Links

- npm: https://www.npmjs.com/package/resin-stream-logger
- Repository: https://github.com/resin-io-modules/stream-logger
- Homepage: https://github.com/resin-io-modules/stream-logger#readme
- Issues: https://github.com/resin-io-modules/stream-logger/issues
- npm.io page: https://npm.io/package/resin-stream-logger

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [@types/node](https://npm.io/package/@types/node.md) ^7.0.13
- [event-stream](https://npm.io/package/event-stream.md) 3.3.5
- [@types/lodash](https://npm.io/package/@types/lodash.md) ^4.14.62

## Recent versions

- 0.1.2 (latest) — 2018-11-26
- 0.1.2-pin-event-stream-2bf657a80f40d59dff2f0de59219acd8f8e820d4 — 2018-11-26
- 0.1.1 — 2017-12-22
- 0.1.0 — 2017-05-12
- 0.0.5 — 2017-05-10
- 0.0.4 — 2017-04-24
- 0.0.3 — 2017-04-24
- 0.0.2 — 2017-04-24
- 0.0.1 — 2017-04-21

## README

# stream-logger

Stream inputs to logs!

## Initialisation

```
logger = new StreamLogger()

logger.addPrefix('info', colors.blue('[Info]'))
logger.addPrefix('warn', colors.orange('[Warn]'))
logger.addPrefix('error', colors.red('[Error]'))
logger.addPrefix('data', colors.yellow('[Data]'))

```

## Creating a stream

```
const stream = logger.createLogStream('data')

dataSource.pipe(stream)
stream.pipe(process.stdout)
```

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