[Feature] shimLog other console functions
Is your feature request related to a problem? Please describe.
The shimLog feature allows us to overwrite console.log to a logger method, there are however many more methods in console that we should be able to override such as console.info, console.warn, and console.error
Describe the solution you'd like optionally pass an object into shimLog instead of a string for the logger method to use. the object would have optional for each one and would only replace those included in the object.
// Replaces `console.log` with `log.debug` !
shimLog(log, 'debug');
// Replaces `console.?` with `log.?` !
shimLog(log, {
log: 'debug',
info: 'info',
warn: 'warn',
error: 'error',
});
Describe alternatives you've considered Importing the normal logger everywhere
I am very much in favor of this proposed solution.
Agree, but do keep in mind that console.error doesn't write to stdout but stderr
Research the purpose of outputting to stderr and potential reasons we would want such? Or potentially a way to customize output depending on logging method? Such that error goes to stderr ?