Cloudwatch Console Logger
![Coverage Status](https://coveralls.io/repos/github/garrettmac/cloudwatch-console-logger/badge.svg?branch=master)
Getting started
This creates a global logger
variable with the option to overide the console
in an aws enviornment to print objects rather than strings.
This is useful when using loggly.com
yarn add cloudwatch-console-logger
Example Usage
import CloudwatchConsoleLogger from 'cloudwatch-console-logger'
CloudwatchConsoleLogger.init({
awsLambdaFunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
awsRegion: process.env.AWS_REGION,
timeZone: process.env.TZ,
enviornment: process.env.STAGE,
prNumber: process.env.PR || 'UNDEF',
cookies: event.headers.Cookie,
headers: event.headers,
hostName: event.headers.Host
});
logger.info(`Hello world`);