I am working on ReactJS for developing a client side of an application, there are very few options available for client side logging as compared to server side on of them which I came across is log4js it has appenders. But are there any other options available? I've used Winston on server side few months ago, can we use such libraries on client side as well? The issue here is I'll have to remove these logs completely before taking this code to production, so I guess I'll use webpack's module for it. But log4js seems to be an overhead so what all alternatives can be used?
2 Answers
I am facing a similar problem at our end. So far I have came across the following options which may be of help:
log Level: Logs at different levels, easy to setup, somewhat similar to bunyanJs and WinstonJS which are used in the backend Nodejs servers.
loglevel-plugin-remote - extension of log level but pushes logs to server after specified interval. There are in fact quite a few more options there

- 21
- 4
It has been almost 4 years since I've asked this question, and now looking at the choices available in market we've decided to go ahead with application monitoring/tracking systems such as sentry for logging the event. We can build a wrapper around the SDK of such services and log the events to track the issue.
Another option was to build our own service, but considering the product in mind the maintenance cost of our own service would have been much more, so we sticked with sentry. There are many other similar options available as well for logging on frontend as well as backend.

- 805
- 10
- 27