mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 12:07:08 -04:00
fix(console-logger): don't sanitize colors away
2467b125
mistakenly applied the sanitize function
to the log messages *after* the color was applied.
This commit reverses the order to un-break colored logs.
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
819dd8f568
commit
3cff7f861a
1 changed files with 4 additions and 4 deletions
|
@ -119,11 +119,11 @@ export class ConsoleLoggerService implements LoggerService {
|
||||||
): void {
|
): void {
|
||||||
let output;
|
let output;
|
||||||
if (isObject(message)) {
|
if (isObject(message)) {
|
||||||
output = ConsoleLoggerService.sanitize(
|
output = `${color('Object:')}\n${ConsoleLoggerService.sanitize(
|
||||||
`${color('Object:')}\n${JSON.stringify(message, null, 2)}\n`,
|
JSON.stringify(message, null, 2),
|
||||||
);
|
)}\n`;
|
||||||
} else {
|
} else {
|
||||||
output = ConsoleLoggerService.sanitize(color(message as string));
|
output = color(ConsoleLoggerService.sanitize(message as string));
|
||||||
}
|
}
|
||||||
|
|
||||||
const localeStringOptions: DateTimeFormatOptions = {
|
const localeStringOptions: DateTimeFormatOptions = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue