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