1.0.4 • Published 1 year ago

custom-logger-prod v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Custom logger

Why it might be helpful

This is a basic console.log abstraction, which removes console.logs when NODE_ENV process variable is set to 'production'.

By default configuration, only logger.error is shown on production - warn and log are hidden.

For example, when using some custom bundler and can't edit its behaviour to remove logs on production, this package might be helpful.

Basic usage

import { logger } from 'custom-logger-prod'

logger.log('Test log')
logger.warn('Test warn')
logger.error('Test error', someObject)
1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago