mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-01 15:12:41 +00: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 {
|
||||
let output;
|
||||
if (isObject(message)) {
|
||||
output = ConsoleLoggerService.sanitize(
|
||||
`${color('Object:')}\n${JSON.stringify(message, null, 2)}\n`,
|
||||
);
|
||||
output = `${color('Object:')}\n${ConsoleLoggerService.sanitize(
|
||||
JSON.stringify(message, null, 2),
|
||||
)}\n`;
|
||||
} else {
|
||||
output = ConsoleLoggerService.sanitize(color(message as string));
|
||||
output = color(ConsoleLoggerService.sanitize(message as string));
|
||||
}
|
||||
|
||||
const localeStringOptions: DateTimeFormatOptions = {
|
||||
|
|
Loading…
Reference in a new issue