JSPM

  • Created
  • Published
  • Downloads 294995
  • Score
    100M100P100Q177615F
  • License Apache-2.0

Ledger logs central point

Package Exports

  • @ledgerhq/logs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ledgerhq/logs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@ledgerhq/logs

Utility library that is used by all Ledger libraries to dispatch logs so we can deal with them in a unified way.

API

Table of Contents

Log

A Log object

Type: {type: string, message: string?, data: any?, id: string, date: Date}

Properties

log

log something

Parameters

  • type string a namespaced identifier of the log (it is not a level like "debug", "error" but more like "apdu-in", "apdu-out", etc...)
  • message string? a clear message of the log associated to the type
  • data any?

listen

listen to logs.

Parameters

  • cb function (Log): void that is called for each future log() with the Log object

Returns Unsubscribe a function that can be called to unsubscribe the listener