@thedigitalbunch/logger
TypeScript icon, indicating that this package has built-in type declarations

1.1.5 • Public • Published

Installation:

$ npm install @thedigitalbunch/logger

Importing:

import { Logger } from '@thedigitalbunch/logger';

Usage:

In a development environment, use environmental variable LOGGER=dev.

const logger = new Logger('TestService');

logger.log('Hello World!');

You can also change the logger options, including the format:

import { developmentConsoleColorFormat, Logger } from '@thedigitalbunch/logger';

Logger.setOptions({ format: developmentConsoleColorFormat() });

You can automatically capture errors with Sentry, by using:

Logger.useSentry({ levels: ['error', 'warning'] });

Readme

Keywords

Package Sidebar

Install

npm i @thedigitalbunch/logger

Weekly Downloads

10

Version

1.1.5

License

MIT

Unpacked Size

40.1 kB

Total Files

22

Last publish

Collaborators

  • kliszek
  • stosiu