diff --git a/src/whisp/whisp.resolver.ts b/src/whisp/whisp.resolver.ts index 78ab134cf..cee22c887 100644 --- a/src/whisp/whisp.resolver.ts +++ b/src/whisp/whisp.resolver.ts @@ -1,4 +1,4 @@ -import { Inject, UseGuards } from '@nestjs/common'; +import { Inject, Logger, UseGuards } from '@nestjs/common'; import { Args, Int, @@ -25,6 +25,8 @@ import { WhispCount } from './whispCount.entity'; @Resolver(() => Whisp) @UseGuards(GqlJwtAuthGuard) export class WhispResolver { + private readonly logger = new Logger(WhispService.name); + constructor( private readonly whispService: WhispService, private readonly distributionService: DistributionService, @@ -124,6 +126,7 @@ export class WhispResolver { @ResolveField(() => [Tag]) async tags(@Root() whisp: Whisp): Promise { // eslint-disable-next-line no-underscore-dangle + this.logger.log('Test logging whisp', JSON.stringify(whisp)); return this.whispService.findTagsByWhispId(whisp._id); } } diff --git a/src/whisp/whisp.service.ts b/src/whisp/whisp.service.ts index 86b8ed34c..9a82e9688 100644 --- a/src/whisp/whisp.service.ts +++ b/src/whisp/whisp.service.ts @@ -127,6 +127,7 @@ export class WhispService { } async findTagsByWhispId(whispId: string): Promise { + this.logger.log('Test logging whispId', whispId); const whisps = await this.whispModel.findById(whispId).populate('tags').exec(); return whisps.tags; }