New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zaneray/express-logging

Package Overview
Dependencies
Maintainers
15
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zaneray/express-logging

Seller of the Product

  • 1.3.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
63
decreased by-25%
Maintainers
15
Weekly downloads
 
Created
Source

ZaneRay Express Logging

  • A wrapper around Winston
  • Supports logging to Google StackDriver for deployed applications

Definitions

Environments

  • development
  • test
  • staging
  • prod

Transports (transports.js)

  • defines where to log in each Environment

Options (options.js)

  • defines how to log in each Environment

Log Levels - from Winston

  • 0: error
  • 1: warn
  • 2: info
  • 3: verbose
  • 4: debug
  • 5: silly

Usage (see test/loggingTest.js)

in your environment

npm install --save @zaneray/express-logging

in your code.js

const logging = require("@zaneray/express-logging");

// set process.env.NODE_ENV in the runtime
// logger level and output method is determined by environment (see transports.js and options.js)
const logger = logging.create();

// Writes some log entries
logger.info("here's some information");
logger.warn("something might be wrong");
logger.error("something is wrong, seriously");

//change log level to log warn and above
logging.setLevel("warn");
//show the current level
logger.warn(logging.getLevel());

// Writes some log entries
logger.info("here's some information");
logger.warn("something might be wrong");
logger.error("something is wrong, seriously");

FAQs

Package last updated on 10 Feb 2022

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