Compare commits

..

No commits in common. "ef99641f2815731aed2bee34bb576a2e04584174" and "e10f760ffb516458683ed8ca2a4ef97dfe2af55f" have entirely different histories.

2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "nestlogged",
"version": "3.3.1",
"version": "3.3.0",
"description": "A NestJS Logger Decorator Library",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",

View File

@ -386,7 +386,7 @@ export class ConsoleLogger implements LoggerService {
if (!scopeInfo) return ['', ''];
const scopeId = scopeInfo[NestloggedScopeId];
const formattedScope = formatScope(scopeInfo[NestloggedScope]);
return this.options.colors ? [`ID=[${clc.cyanBright(scopeId)}] | `, clc.cyanBright(formattedScope)] : [`ID=[${scopeId}] | `, formattedScope]
return this.options.colors ? [`ID=[${clc.cyanBright(scopeId)}] | `, formattedScope] : [`ID=[${scopeId}] | `, formattedScope]
}
protected printAsJson(
@ -462,7 +462,9 @@ export class ConsoleLogger implements LoggerService {
const output = this.stringifyMessage(message, logLevel);
pidMessage = this.colorize(pidMessage, logLevel);
formattedLogLevel = this.colorize(formattedLogLevel, logLevel);
return `${pidMessage}${this.getTimestamp()} ${formattedLogLevel} ${contextMessage}${formattedScopeInfo[0]}${formattedScopeInfo[1]}${output}${timestampDiff}\n`;
let colorizedScope = '';
if (formattedScopeInfo[1]) colorizedScope = this.colorize(formattedScopeInfo[1], logLevel);
return `${pidMessage}${this.getTimestamp()} ${formattedLogLevel} ${contextMessage}${formattedScopeInfo[0]}${colorizedScope}${output}${timestampDiff}\n`;
}
protected stringifyMessage(message: unknown, logLevel: LogLevel) {