Skip to content

obi-tec/logger-console

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"