-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
I am having some trouble with the colorizing of logs. Specifically, when logging to non-tty outputs.
There is an override in colorize.js:9 that prevents the colors package to enable or disable when supported.
First of all, I would like to know why this decision was made, and if it can be removed.
I have made a hack as a workaround. Here it is, in case anyone wants to know how to do it:
format: format.combine(
LOGGER_COLORS === 'true' ? format.colorize({ all: true }) : format(i => i)(),
format.printf(({
label = 'default',
namespace = 'default',
level = 'debug',
message,
timestamp,
}) => {
let string = `${label}:${namespace} ${level}: ${message}`;
if (LOGGER_CONSOLE_TIMESTAMP === 'true') {
string = `${timestamp} ${string}`;
}
return string;
}),
),maxsatula, AuHau, davidglivar and supnate
Metadata
Metadata
Assignees
Labels
No labels