MCPcopy
hub / github.com/nestjs/nest / printFoundInModuleLog

Method printFoundInModuleLog

packages/core/injector/injector.ts:1271–1285  ·  view source on GitHub ↗
(
    token: InjectionToken,
    moduleRef: Module,
  )

Source from the content-addressed store, hash-verified

1269 }
1270
1271 private printFoundInModuleLog(
1272 token: InjectionToken,
1273 moduleRef: Module,
1274 ): void {
1275 if (!this.isDebugMode()) {
1276 return;
1277 }
1278 const tokenName = this.getTokenName(token);
1279 const moduleRefName = moduleRef?.metatype?.name ?? 'unknown';
1280 this.logger.log(
1281 `Found ${clc.cyanBright(tokenName)}${clc.green(
1282 ' in ',
1283 )}${clc.magentaBright(moduleRefName)}`,
1284 );
1285 }
1286
1287 private isDebugMode(): boolean {
1288 return !!process.env.NEST_DEBUG;

Callers 2

lookupComponentMethod · 0.95

Calls 3

isDebugModeMethod · 0.95
getTokenNameMethod · 0.95
logMethod · 0.65

Tested by

no test coverage detected