Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

snackdriver

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snackdriver

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

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 29 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc