# loo

> Minimalistic streaming logger with layered transport system

Latest version **4.0.0** (published 2016-09-25) · 0 weekly downloads

## Install

```sh
npm install loo
pnpm add loo
yarn add loo
bun add loo
```

## 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 | 4.0.0 |
| Published | 2016-09-25 |
| First published | 2016-05-25 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Matthew Mueller |
| Maintainers | mattmueller |
| Keywords | logging, transports, stream, streaming, simple, logs |

## Links

- npm: https://www.npmjs.com/package/loo
- Repository: https://github.com/MatthewMueller/loo
- Homepage: https://github.com/MatthewMueller/loo#readme
- Issues: https://github.com/MatthewMueller/loo/issues
- npm.io page: https://npm.io/package/loo

## Dependencies (9)

- [isobj](https://npm.io/package/isobj.md) 1.0.0
- [events](https://npm.io/package/events.md) 1.1.1
- [sliced](https://npm.io/package/sliced.md) 1.0.1
- [tumbleweed](https://npm.io/package/tumbleweed.md) 0.0.4
- [split-string](https://npm.io/package/split-string.md) 0.1.1
- [stream-write](https://npm.io/package/stream-write.md) 1.0.1
- [object-assign](https://npm.io/package/object-assign.md) 4.1.0
- [readable-stream](https://npm.io/package/readable-stream.md) 2.1.5
- [json-stringify-safe](https://npm.io/package/json-stringify-safe.md) 5.0.1

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2016-09-25
- 3.0.0 — 2016-05-25

## README

# loo

  Minimalistic streaming logger with a layered transport and custom field support.

  Uses the same output format as [bole](https://github.com/rvagg/bole), so tools like [bistre](https://github.com/hughsk/bistre) and [garnish](https://github.com/mattdesl/garnish) will work great.

## Installation

```bash
npm i loo
```

## Example

```js
let log = require('loo')

// application logging
let app = log('app')

// direct everything to a papertrail stream
app.pipe(papertrail(creds))

// direct error & fatal levels to process.stderr
app.error.pipe(process.stderr)
app.fatal.pipe(process.stderr)

// postgres service logging
let postgres = app('postgres')

// log the postgres debug & info events to stdout
postgres.debug.pipe(process.stdout)
postgres.info.pipe(process.stdout)

let query = 'SELECT * FROM teams'
let client = Postgres(url)

// add custom fields
postgres.debug.fields({ client: client.id })

// log out with printf support
postgres.debug('running query %s', query)
```

## Levels

- **trace**: finer-grained informational events than the debug
- **debug**: fine-grained informational events that are most useful to debug an application
- **info**: informational messages that highlight the progress of the application at coarse-grained level
- **warn**: potentially harmful situations
- **error**: error events that might still allow the application to continue running.
- **fatal**: very severe error events that will presumably lead the application to abort.

## Tests

```
npm install
npm test
```

## License

MIT

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