1.1.3 • Published 4 years ago

snackdriver v1.1.3

Weekly downloads
36
License
UNLICENSED
Repository
github
Last release
4 years ago

snackdriver

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

install:

npm install --save snackdriver

example:

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

app.use(log.koaMiddleWare());

express request logging middleware

app.use(log.expressMiddleWare());

console output:
alt text

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

stackdriver output:
alt text

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.7

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago