Closed piotr-roslaniec closed 5 years ago
@piotr-roslaniec I'm not really sure if I understand what you mean or how the logging could be enhanced for the frontend. But the logger
declared in react-redux-boilerplate/server/util/logger.js
is not really of much use. It's just used to print on the console whether the server has started and on what port it's running on. In one of the other projects I am working on I have replaced the logger with winston
already and it's really good for server side logging.
Perhaps could you clarify a bit more on how we could implement application level logging for frontend and how these logs could be used for debugging?
@flexdinesh Thank you for your response.
Sorry for being so indirect earlier, but I hadn't thought it through
I had some issues with debugging my project in production lately. I thought I'd go about implementing some logging solution like PaperTrail or Sentry to detect client-side errors (not sure if I used nomenclature correctly). I thought I'd ask around for some recommendation and maybe PR this later if someone finds it useful.
@piotr-roslaniec Implementing a client side logging with PaperTrail and Sentry sounds like a great idea for actual projects. But for boilerplates, the scope is too wide and not everyone would want a client side logging tool and we want to keep this boilerplate to as minimal as possible. Also, these tools would involve an account setup and API key to use it with the application, which is again a strenuous process to quickly start with the boilerplate. Perhaps if we could create an example optional code and is turned off by default in such a way that people could use that logic only if they decide to use it. That makes more sense in the context of a boilerplate. I'd very much welcome a PR if we could keep this feature optional and have a solid example to state its purpose.
Closing due to inactivity
Currently, the frontend app is configured to log information on the server level (node). This makes debugging difficult.
How would you go about implementing application-level logging? There is
logger
already declaredreact-redux-boilerplate/server/util/logger.js
. Should I add another lib (perhapswinston
) or reworklogger.js
?@flexdinesh Could you share your thoughts about that?