actually use error stream for errors
This commit is contained in:
parent
40f6bc572e
commit
127bc40ba6
@ -222,9 +222,14 @@ class MasterLogger implements Logger
|
||||
const maxChars = Math.max(...this.#types.map(t => t.length));
|
||||
const spacer = ' '.repeat(maxChars - type.length);
|
||||
|
||||
if (this.#_logLevelMapping[type] >= this.#_logLevel)
|
||||
console.log(`${colour.func(type)}${spacer} ${colour.func(header)}: ${chalk.bold(subheader)}${text}`); // eslint-disable-line no-console
|
||||
|
||||
if (this.#_logLevelMapping[type] >= this.#_logLevel)
|
||||
{
|
||||
const out = `${colour.func(type)}${spacer} ${colour.func(header)}: ${chalk.bold(subheader)}${text}`;
|
||||
if (type === 'error')
|
||||
console.error(out); // eslint-disable-line no-console
|
||||
else
|
||||
console.log(out); // eslint-disable-line no-console
|
||||
}
|
||||
if ((broadcast || this.#_broadcastLevel <= this.#_logLevelMapping[type]) && this.#webhook)
|
||||
{
|
||||
const description = (subheader.length ? `**${subheader}**\n` : '') + `\`\`\`${text}\`\`\``;
|
||||
|
Loading…
Reference in New Issue
Block a user