IOpipe plugin for logging

Downloads in past


231.2.04 years ago4 years agoMinified + gzip package size for @iopipe/logger in KB


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.


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!'


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.


Apache-2.0 see LICENSE
Copyright 2018, IOpipe, Inc.