Currently basic logger (console.log) is used through out the panelServer app. In this case one my know the error but not able to deduce the location of the error easily. From technical standpoint console.log is a synchronous function which further causes performance issues if used excessively.
Solution
Add a logger module with multiple log level and trace info, by this approach log can be classified based on the severity of log level corresponding to individual log, and with trace info developer can pin point the error based upon log provided.
How a log will look like:
[0063d66abade48252c98dc1abb053b01] [2020-08-22T02:09:02.185] [INFO] <Server> {panelServer/server.js:136} => Server is running on port 3535.
INFO
This issue is specific to back-end side of the application
Problem
Currently basic logger (
console.log
) is used through out thepanelServer
app. In this case one my know the error but not able to deduce the location of the error easily. From technical standpointconsole.log
is a synchronous function which further causes performance issues if used excessively.Solution
Add a logger module with multiple log level and trace info, by this approach log can be classified based on the severity of log level corresponding to individual log, and with trace info developer can pin point the error based upon log provided.
How a log will look like:
INFO