From 3a6925f9d827811224cf95f644a0d5940d69d515 Mon Sep 17 00:00:00 2001 From: portable Date: Fri, 26 Jun 2026 16:34:54 +0100 Subject: [PATCH] feat: add structured Logger to transactions.service.ts (#803) --- src/transactions/transactions.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/transactions/transactions.service.ts b/src/transactions/transactions.service.ts index 57e51637..98f7f1cd 100644 --- a/src/transactions/transactions.service.ts +++ b/src/transactions/transactions.service.ts @@ -465,6 +465,7 @@ export class TransactionsService { await this.commissionsService.createCommissionsForTransaction(transaction.id); + this.logger.log(`Transaction created via createTransaction: ${transaction.id}`); return transaction; } @@ -508,6 +509,7 @@ export class TransactionsService { }, }) .then((result: any) => { + this.logger.log(`Tax strategy created for transaction ${transactionId}: ${dto.strategyType}`); this.notificationsService.sendNotification( user.sub, 'Tax Strategy Created', @@ -544,6 +546,7 @@ export class TransactionsService { if (!existing) throw new NotFoundException('Tax strategy not found'); + this.logger.log(`Updating tax strategy ${strategyId} for transaction ${transactionId}`); return this.prisma.transactionTaxStrategy.update({ where: { id: strategyId }, data: { @@ -563,6 +566,7 @@ export class TransactionsService { }); if (!transaction) throw new NotFoundException('Transaction not found'); + this.logger.log(`Updating escrow for transaction ${transactionId}`); const data: any = {}; if (dto.escrowStatus !== undefined) data.escrowStatus = dto.escrowStatus; if (dto.escrowAmount !== undefined) data.escrowAmount = dto.escrowAmount;