# iso-bunyan-stream

> An isomorphic bunyan stream for development.

Latest version **1.0.0** (published 2014-12-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install iso-bunyan-stream
pnpm add iso-bunyan-stream
yarn add iso-bunyan-stream
bun add iso-bunyan-stream
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-12-02 |
| First published | 2014-12-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Michael Schoonmaker |
| Maintainers | schoonology |

## Links

- npm: https://www.npmjs.com/package/iso-bunyan-stream
- npm.io page: https://npm.io/package/iso-bunyan-stream

## Dependencies (1)

- [colors](https://npm.io/package/colors.md) ~1.0.3

## Recent versions

- 1.0.0 (latest) — 2014-12-02

## README

# Isomorphic Bunyan Stream

Just what it says on the label: a simple, isomorphic Bunyan stream for use in
Node and the browser. It's intended to be used _only for development_, so all
context gets stripped out: only the message, level, logger name, and a simple
timestamp are displayed.

## Why is this useful?

Isomorphic applications, as much or moreso than client-only, single-page
web applications, are a distributed computing problem. Good logs provide a
simple, sane way to reason about the flow of information through such a
distributed system, but we need a way to reason about _all_ actors involved,
including the browser. As such, we're well-served by a consistent stream shared
between both types of actor: the client (browsers) and the server (Node).

## Installation

As always, it's just an NPM module:

```
npm install --save iso-bunyan-stream
```

## Usage

The stream _requires_ being added in raw mode:

```javascript
var bunyan = require('bunyan');
var logger = bunyan.createLogger({
  name: 'SomeApp',
  streams: [{
    level: 'info',
    type: 'raw',
    stream: {
      write: function (record) {
        console.log('%s %s| %s: %s', colors.grey(record.name), colors.grey(record.time.toLocaleTimeString()), colors[LEVEL_COLORS[record.level]](LEVEL_NAMES[record.level]), record.msg);
      }
    }
  }]
});
```

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