npm.io
1.1.0 • Published 4 years ago

@unicity/cloudwatch-logger

Licence
UNLICENSED
Version
1.1.0
Deps
4
Size
11 kB
Vulns
1
Weekly
0

Unicity-Cloudwatch-Logger

About

const Logger = require('@unicity/cloudwatch-logger');

const env    = 'qa';
const logger = new Logger({
	service                   : 'events', // this is optional and adds a key saying service in each message.
	groupName                 : `hydra${env}.unicity.net/v5a`,
	streamName                : 'test',
	region                    : 'us-east-1',
	handleUnhandledExceptions : true,
	logLocallyOnly            : true // true will make this not actually log to AWS and only log locally
});

logger.info('hello world', event);