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

@iopipe/logger

Package Overview
Dependencies
Maintainers
9
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iopipe/logger

IOpipe plugin for logging

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
9
Created
Source

IOpipe JS Logger Plugin

npm version styled with prettier semantic-release

This is a logging plugin for use with IOpipe and AWS Lambda. Automatically records output from console for viewing in the IOpipe dashboard.

Installation

With yarn (recommended) in project directory:

yarn add @iopipe/logger

With npm in project directory:

npm install @iopipe/logger

Then include the plugin with IOpipe in your serverless function:

const iopipeLib = require('@iopipe/iopipe');
const logger = require('@iopipe/logger');

const iopipe = iopipeLib({
  token: process.env.IOPIPE_TOKEN,
  plugins: [logger({ enabled: true })]
});

exports.handler = iopipe(async (event) => {
  console.log('This will show up in IOpipe!');
  // supported methods include log, debug, info, warn, error, and dir
  return 'Hello world!'
});

Config

enabled (bool: optional = false)

By default, this plugin is disabled. To automatically record output of calls to console, set this value to true. You can also use an environment variable like this: IOPIPE_LOGGER_ENABLED=true.

networkTimeout (number: optional = 5000)

Network timeout for uploading logs to IOpipe.

License

Apache-2.0 see LICENSE

Copyright 2018, IOpipe, Inc.

Keywords

FAQs

Package last updated on 16 Nov 2018

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