Look at implementing an "application wide" logger (and observability system?) which would provide a unified way to output errors, log info, metrics etc.
Ideas:
- Logger should exist in app layer so it can be easily accessed by end users in production builds for debugging, bug reporting etc.
- Platform layer logs should be sent to app layer to combine logs from different layers. Note the app is open source built to work with users own files, so no need to worry about implementation leaks/security etc.
- All errors/logs on desktop can easily be sent to app, can the same be done on mobile where the capacitor wrapper has much more custom code?
- Logs entries should be standard json including source (platform, app etc) level (error, info, warn, logs, perf etc), message, context, cause, timestamp etc.
Look at implementing an "application wide" logger (and observability system?) which would provide a unified way to output errors, log info, metrics etc.
Ideas: