This package has been deprecated

Author message:

this package has been deprecated

adept-logger-node

2.0.0 • Public • Published

adept-logger-node

Install logger using npm

npm install --save git+ssh://git@github.com:AdeptMind/adept-logger-node.git

To send logs to adept_analytics_v1 firehose do following:

import { AdeptLogger, AdeptFireHoseHandler, AdeptStdOutHandler } from 'adept-logger-node';

const FIREHOSE_STREAM = 'adept_analytics_v1';
const logger = new AdeptLogger();
logger.addHandler(new AdeptFireHoseHandler(FIREHOSE_STREAM))
logger.addHandler(new AdeptStdOutHandler()) // This handler will simply log to console

// If logs are being sent from a specific shop, you can include `shop_id` in `msg` object i.e. msg['shop_id'] = SHOP_ID
logger.log({
  event: 'ADEPT_SESSION', // Event Name
  message: msg,  // It could be a string or a JSON objct
})
P.S. If no handler is provided, logger will log to console by default

For firehose handler to work properly you need to configure aws using your AWS IAM credentials and us-west-2 region.

aws configure

Readme

Keywords

none

Package Sidebar

Install

npm i adept-logger-node

Weekly Downloads

0

Version

2.0.0

License

ISC

Unpacked Size

18.5 kB

Total Files

9

Last publish

Collaborators

  • apyukin