ripple / explorer

Open Source XRP Ledger Explorer
https://livenet.xrpl.org/
MIT License
115 stars 67 forks source link

Switch from `bunyan` to `debug` on the front end #360

Open ckniffen opened 2 years ago

ckniffen commented 2 years ago

When rippled calls were moved to the frontend bunyan code was not updated. Since we are not using a browser compatible bunyan the messages never appear. This will reduce the bundle size by 29KB gzipped. We can just change it to debug calls through src/containers/shared/log.js

The only place bunyan is used on the frontend is here https://github.com/ripple/explorer/blob/staging/src/rippled/lib/logger.js.

mvadari commented 2 years ago

I thought about this when I first moved the calls to the frontend (it wasn't a priority, though). The frontend uses a different logging library, debug (located in src/containers/shared/log.js). Ideally all of the logs would use that instead.

It would be especially useful if we could send all those logs back to the backend containers via some API endpoint, so that we have a record of all the logs users are getting (many of them will forget to/not know how to get the console data).

ckniffen commented 2 years ago

It would be especially useful if we could send all those logs back to the backend containers via some API endpoint, so that we have a record of all the logs users are getting (many of them will forget to/not know how to get the console data).

On xrplgrants.org and ripple.com we use DataDog to collect error logs.

mvadari commented 2 years ago

That works too - I don't think it matters too much how they're collected, but right now we're not collecting them at all.