Socket
Socket
Sign inDemoInstall

@skyhookadventure/lambda-logger

Package Overview
Dependencies
1
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @skyhookadventure/lambda-logger

[![Built with typescript](https://badgen.net/badge/icon/typescript?icon=typescript&label)](https://www.typescriptlang.org/) [![version](https://badgen.net/npm/v/skyhook-lambda-logger)](https://www.npmjs.com/package/skyhook-lambda-logger) ![dependants](htt


Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Install size
333 kB
Created
Weekly downloads
 

Readme

Source

Skyhook Lambda Logger

Built with
typescript version dependants license

Exports a pre-configured loglevel logger.

Use

import log from '@skyhookadventure/lambda-logger';

// In descending order
log.error({ success: false });
log.warn({ success: 'maybe' });
log.info({ success: true });
log.debug({ success: true }); // Doesn't show by default

// Enable debug
process.env.LOG_LEVEL = 'debug';

Guidelines

  1. Don't log private data (e.g. don't log a request object if it has a username in it).
  2. Focus on logging small objects that can be searched rather than strings

Setting the output log level

By default the log level used is INFO (i.e. HTTP errors won't be shown). In (Jest) testing environments the level is set to ERROR instead.

You can override this by setting process.env.LOG_LEVEL.

Checklist

CD FeatureProvided
Typescript
Linting (AirBnB + Prettier)
Unit tests (Jest)
Coverage check (ideally 100% with Jest)
Github Continuous Deployment

Built by Skyhook

This module is contributed by the team at Skyhook.

FAQs

Last updated on 06 Aug 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc