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

1.1.1 • Public • Published

Logger Console

A simple library write log for Lambda Applications with Cloudwatch logs.

Installation

npm install @obi-tec/logger-console

Usage

const logger = require('@obi-tec/logger-console');

logger.info('Some log info');

const details = {
    otherMessage: 'Some other message'
};
logger.info('Some log info with details', details);

Change log level

To change the log level is used the environment variable process.env.LOG_LEVEL

The default value is info

Options:

LOG_LEVEL="debug"
LOG_LEVEL="info"
LOG_LEVEL="warn"
LOG_LEVEL="error"
LOG_LEVEL="request"
LOG_LEVEL="none"

Package Sidebar

Install

npm i @obi-tec/logger-console

Weekly Downloads

276

Version

1.1.1

License

Apache License

Unpacked Size

16.7 kB

Total Files

5

Last publish

Collaborators

  • brunocamboim
  • jonatas.saraiva
  • dev-obi-tec