1.1.1 • Published 7 months ago

@obi-tec/logger-console v1.1.1

Weekly downloads
-
License
Apache License
Repository
github
Last release
7 months ago

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"