Design Error Logging service

Hi,

How to provide a Error Logging Service so that my consumers (React web applications) can consume it as a service and use in Catch statements.

A react application can use this service (as an npm package) and use in their application at appropriate places.

This service when placed in any code block should make an api call to a service to post the consumers error data.

It is simple but If an application uses it at multiple places to log the errors then there will be several API calls made to store the error data.

How can I send bunch of error logs at once, is there any standard approach for this kind of problem ?

Comments (5)