Closed brandoningli closed 2 years ago
We can either try overriding console
or making our own logger and replace all instances.
I'd highly recommend looking into an existing nodejs library for logging. Should give us more granular control over logging levels, rotating log files, log to a file and the console at the same time (maybe colorized), and potentially give us the option to log to something like a Graylog server in the future easily. The winston
library looks like it could be a winner. See also this article that talks about Winston, but ignore the parts specific to adding Loggly logging handlers.
Adding some information about winston and the log level guidelines to a wiki page.
Is your feature request related to a problem? Please describe.
Errors can be hard to track down in the terminal output.
Describe the solution you'd like
Log errors and other debug info to a file for easy future inspection.
Describe alternatives you've considered
Additional context