# @soliveira/bunyan-lambda-stream

> Uses console for logging instead of stdout/stderr. This makes it easier to read the logs from CloudWatch when using AWS Lambda

Latest version **1.0.0** (published 2018-10-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install @soliveira/bunyan-lambda-stream
pnpm add @soliveira/bunyan-lambda-stream
yarn add @soliveira/bunyan-lambda-stream
bun add @soliveira/bunyan-lambda-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 | 2018-10-01 |
| First published | 2018-10-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Steve Oliveira |
| Maintainers | soliveira |
| Keywords | aws, lambda, cloudwatch, bunyan, logger |

## Links

- npm: https://www.npmjs.com/package/@soliveira/bunyan-lambda-stream
- Repository: https://github.com/soliveira-vouga/sns-publisher
- Homepage: https://github.com/soliveira-vouga/sns-publisher#readme
- Issues: https://github.com/soliveira-vouga/sns-publisher/issues
- npm.io page: https://npm.io/package/@soliveira/bunyan-lambda-stream

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

- 1.0.0 (latest) — 2018-10-01

## README

# bunyan-lambda-stream

Writes bunyan logs using console for easier reading from CloudWatch


## Install

`npm i @soliveira/bunyan-lambda-stream`

## Usage

``` js
const bunyan = require('bunyan')
const lambdaStream = require('@soliveira/bunyan-lambda-stream')
const log = bunyan.createLogger({
  name: 'foo',
  streams: [{
      stream: lambdaStream(),
      type: 'raw'
    }]
})
```

In cloudwatch a log record should now look like the following:

```text
2018-10-01T20:29:15.951Z a9ae59ca-c5b8-11e8-93b1-15c8516d5d59
{
  "name": "bunyan-lambda-stream",
  "hostname": "admins-MacBook-Pro-2.local",
  "pid": 56822,
  "level": 30,
  "msg": "test",
  "time": "2018-10-01T21:19:21.423Z",
  "v": 0
}
```

Note that the cloudwatch record timestamp and requestId are preserved

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