Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Improve Logging in Javascript SDK #20

Open
peterschwarz opened this issue Mar 1, 2021 · 0 comments
Open

Improve Logging in Javascript SDK #20

peterschwarz opened this issue Mar 1, 2021 · 0 comments

Comments

@peterschwarz
Copy link
Contributor

Currently, the Javascript SDK logs any errors, warnings, info and debug messages to console.log. This doesn't give the application developer any control over logging.

We should provide a way to emit these as events, and the application developer can listen for and pass on the events to whatever logging implementation the want.

E.g. An application developer can get internal messages via:

transactionProcessor.on('log:error', (message) => console.log('ERROR: ' + message))
transactionProcessor.on('log:info', (message) => console.log('INFO: ' + message))
// Uncomment for debug logging
// transactionProcessor.on('log:debug', (message) => console.log('DEBUG: ' + message))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant