It's popular to use console.log() in web development. The problem is that unless developers are careful to remove to remove all their console.log() calls we can quickly end up with console spam. In many cases simply removing the console.log calls is desired, but a consistent way for the framework and plugins to log a fatal problems, errors, warnings, and debug information would be helpful to course authors, developers, and operations.
A logging model could have functions for reporting fatal, error, warn, info, and debug events and details about the event. If these events are then emitted as a traditional event (log:fatal, log:warn, etc...) plugins that wish to receive these events and relay them to a central logging system can. Developers can use debug and info level events to add debugging and publish their plugins without having to worry about log spam. Course developers can disable or adjust the log level so that only high severity issues are written to their consoles and/or reported to log forwarder plugins. In the event that a course author experiences a problem they can lower the log level and see debug or info logs which will help improve bug reports.
I've done a little work on this and when I have the code in working state I will post a link.
It's popular to use
console.log()in web development. The problem is that unless developers are careful to remove to remove all theirconsole.log()calls we can quickly end up with console spam. In many cases simply removing the console.log calls is desired, but a consistent way for the framework and plugins to log a fatal problems, errors, warnings, and debug information would be helpful to course authors, developers, and operations.A logging model could have functions for reporting
fatal,error,warn,info, anddebugevents and details about the event. If these events are then emitted as a traditional event (log:fatal,log:warn, etc...) plugins that wish to receive these events and relay them to a central logging system can. Developers can usedebugandinfolevel events to add debugging and publish their plugins without having to worry about log spam. Course developers can disable or adjust the log level so that only high severity issues are written to their consoles and/or reported to log forwarder plugins. In the event that a course author experiences a problem they can lower the log level and see debug or info logs which will help improve bug reports.I've done a little work on this and when I have the code in working state I will post a link.