@ledgerhq/logs

Ledger logs central point

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@ledgerhq/logs
120746.10.17 days ago3 years agoMinified + gzip package size for @ledgerhq/logs in KB

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

*   [Parameters](#parameters)
*   [Parameters](#parameters-1)

Log

A Log object

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 Subscriber that is called for each future log() with the Log object

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