etherealengine
etherealengine copied to clipboard
Replace console.log() usage in the client with ClientLogger usage
On the server side, we are not exclusively using Pino.js logger methods (logger.info(), .error(), .warn() etc) instead of console.log().
This allows us to aggregate console and error logs by sending them to Elasticsearch for indexing.
This task is to do the same for the client side. Since Pino.js is a Node-only library, we will create a lightweight logger.ts module that will output a logger instance with the same API as Pino's logger.
- [x] Implement a
ClientLoggermodule - [ ] Replace all client-side
console.*()usage withlogger.info()etc. - [x] Initially, the logger will still only output to the browser console.
- [x] Once all logging is converted to use the clientlogger, we will hook it up to an external log aggregator service (Rollbar, or our own server-side logging API endpoint).