@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?, 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
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