fix(nestlogged): make ScopedLogger accept string[] as scope

This commit is contained in:
Shinwoo PARK 2025-03-27 05:49:49 +09:00
parent 3a7c78d1c9
commit cb324c54be

View File

@ -36,7 +36,7 @@ export class ScopedLogger extends Logger {
static fromSuper( static fromSuper(
baseLogger: Logger, baseLogger: Logger,
logger: ScopedLogger, logger: ScopedLogger,
scope: string, scope: string | string[],
): ScopedLogger { ): ScopedLogger {
return new ScopedLogger( return new ScopedLogger(
baseLogger, baseLogger,
@ -46,7 +46,7 @@ export class ScopedLogger extends Logger {
} }
static fromRoot( static fromRoot(
logger: Logger, logger: Logger,
scope: string, scope: string | string[],
scopeId?: string, scopeId?: string,
): ScopedLogger { ): ScopedLogger {
return new ScopedLogger(logger, [scope], scopeId); return new ScopedLogger(logger, [scope], scopeId);