# snackdriver

> A bite-sized bunyan logger with color and a built-in stackdriver stream.

Latest version **1.1.3** (published 2019-10-29) · UNLICENSED license · 0 weekly downloads

## Install

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

## 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.1.3 |
| Published | 2019-10-29 |
| First published | 2019-09-12 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 100.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Nathan Cobb |
| Maintainers | smick |
| Keywords | stackdriver |

## Links

- npm: https://www.npmjs.com/package/snackdriver
- Repository: https://github.com/the-control-group/snackdriver
- Homepage: https://github.com/the-control-group/snackdriver#readme
- Issues: https://github.com/the-control-group/snackdriver/issues
- npm.io page: https://npm.io/package/snackdriver

## Dependencies (5)

- [uuid](https://npm.io/package/uuid.md) ^3.3.3
- [bunyan](https://npm.io/package/bunyan.md) ^1.8.12
- [response-time](https://npm.io/package/response-time.md) ^2.3.2
- [bunyan-debug-stream](https://npm.io/package/bunyan-debug-stream.md) ^2.0.0
- [@google-cloud/logging-bunyan](https://npm.io/package/@google-cloud/logging-bunyan.md) ^1.2.1

## Recent versions

- 1.1.3 (latest) — 2019-10-29
- 1.1.2 — 2019-10-29
- 1.1.1 — 2019-10-29
- 1.1.0 — 2019-10-29
- 1.0.22 — 2019-10-29
- 1.0.21 — 2019-10-28
- 1.0.20 — 2019-10-28
- 1.0.19 — 2019-10-28
- 1.0.18 — 2019-10-28
- 1.0.17 — 2019-10-28
- 1.0.16 — 2019-10-28
- 1.0.15 — 2019-10-28
- 1.0.14 — 2019-10-28
- 1.0.13 — 2019-10-28
- 1.0.12 — 2019-10-28
- … 11 more at https://npm.io/package/snackdriver/versions

## README

<div style="text-align:center;"><img style="width: 40%; margin: -100px 0 -50px 0;" src="SnackDriver.png" /></div>

# snackdriver

A bite-sized bunyan logger with color, express middleware and a built-in stackdriver stream.

### install:

`npm install --save snackdriver`

### example:

```javascript
const Logger = require("snackdriver");
const log = new Logger({
	logName: "test",
	logStreams: [
		{ env: "development", stream: "bunyanDebugStream" },
		{ env: "development", stream: "stdout" },
		{ env: "production", stream: "stackdriver" }
	],
	logLevel: "info"
});

log.info("hello world");
log.warn("oh no world");
log.error("ruh roh world");
```

### Koa request logging middleware

```javascript
app.use(log.koaMiddleWare());
```

### express request logging middleware

```javascript
app.use(log.expressMiddleWare());
```

**console output:**  
![alt text](console.png "Pretty huh?")

And if your `NODE_ENV` is set to `production` it logs to stack driver.

**stackdriver output:**  
![alt text](stackdriver.png "noice!")

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