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

@invisible/logger

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@invisible/logger

Invisible Logging Wrapper


Version published
Maintainers
5
Created

logger

Invisible Logging Wrapper.

Install

yarn add @invisible/logger

Usage

const logger = require('@invisible/logger')

logger.debug('This is a debug message', { meta: true })

Make sure to set LOGGER_LEVEL = silly on your development environment.

Default Transports

Console

Will only be colorized in development. The defaule logging level is info, but you can use the LOGGER_LEVEL environment variable to adjust the logging level.

Bugsnag

To use bugsnag, just define BUGSNAG_KEY environment variable. You can also use the BUGSNAG_LEVEL environment variable to set the logging level.

Google Logger

Only worsk in production. Logging level also specified through the LOGGER_LEVEL environment variable.

Additional Transports

You can add an aditional transport with

const logger = require('@invisible/logger')

logger.add(winston.transports.File, { filename: 'somefile.log' })

FAQs

Package last updated on 27 Sep 2017

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