consolidated-logging
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

consolidated-logging

Installation

npm install consolidated-logging

Usage

import ConsolidatedLogger from 'consolidated-logging';

const consolidatedLogger = new ConsolidatedLogger({
    apiHost: 'http://apihost.com',
});

API


Tracking one time custom events:

sendCustomLogEvent({ type, data })


Tracking the duration of time an active event spanned.

startCustomTimeDurationLogEvent({ type, data })
stopCustomTimeDurationLogEvent({ type, data })


Built-in supported events:

Each time the value of the input field changes:
setupInputChangeLogEvent({ selector, data })

The amount of time the user is focused on a given input field:
setupInputFocusEvent({ selector, data })

Other considerations:

All events are fired assuming that the user is online and connected to the internet. In the event, that this is not the case, then the events are persisted locally until the user comes back online.

Readme

Keywords

none

Package Sidebar

Install

npm i consolidated-logging

Weekly Downloads

1

Version

1.0.12

License

ISC

Unpacked Size

27.1 kB

Total Files

11

Last publish

Collaborators

  • alvinhuynh