Closed pke closed 10 months ago
Some consoles (e.g. chrome's) color the output according to the method used (console.warn, console.error, etc...) so I opted to create a separate transport without the colors...
Reopen if you think it is still necessary.
In VSCode when using mapConsoleTransport
, it only colors the first part of the log message (LOG, DEBUG, WARN, or ERROR). Not the actual log message.
When using consoleTransport, it colors the whole message, but all of the logs are prefixed with "LOG" because it's just using console.log
for all the log levels. This is confusing to look at because I'm logging things at different levels.
I'd like this feature, if possible.
Even if it's just a third transport (coloredMaptTransport) or something.
I recently wrote a test and wondered why my expectation that the
logger.error
would callconsole.error
eventually did not work. Then I found out that consoleTransport usesconsole.log
always and that to mimic console output traditionally one would have to usemapConsoleTransport
Now I have 2 questions:
consoleTransport
using onlyconsole.log
?mapConsoleTransport
not supporting colours.Would it be possible to merge the 2 and have it map by default and use coloured output?