Skip to content

Scheduling infrastructure for absolutely everyone.

chore: add debug logs (#23278)

Lauris Skraucis61268f36b94b
diff --git a/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts b/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts
index 640c09b97ba..dd3016e034f 100644
--- a/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts
+++ b/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts
@@ -39,6 +39,7 @@ import {
HttpStatus,
NotFoundException,
Query,
+ Logger,
} from "@nestjs/common";
import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
@@ -66,6 +67,8 @@ export type EventTypeHandlerResponse = {
@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsEventTypesController {
+ private readonly logger = new Logger("OrganizationsEventTypesController");
+
constructor(
private readonly organizationsEventTypesService: OrganizationsEventTypesService,
private readonly inputService: InputOrganizationsEventTypesService,
@@ -88,6 +91,10 @@ export class OrganizationsEventTypesController {
teamId,
bodyEventType
);
+ this.logger.debug(
+ "nl debug - create org team event type - transformedBody",
+ JSON.stringify(transformedBody, null, 2)
+ );
const eventType = await this.organizationsEventTypesService.createOrganizationTeamEventType(
user,
diff --git a/apps/api/v2/src/modules/organizations/event-types/services/organizations-event-types.service.ts b/apps/api/v2/src/modules/organizations/event-types/services/organizations-event-types.service.ts
index 8a45e96c971..d38fa37f900 100644
--- a/apps/api/v2/src/modules/organizations/event-types/services/organizations-event-types.service.ts
+++ b/apps/api/v2/src/modules/organizations/event-types/services/organizations-event-types.service.ts
@@ -47,6 +47,10 @@ export class OrganizationsEventTypesService {
prisma: this.dbWrite.prisma,
},
});
+ this.logger.debug(
+ "nl debug - create org team event type - eventTypeCreated",
+ JSON.stringify(eventTypeCreated, null, 2)
+ );
return this.teamsEventTypesService.updateTeamEventType(eventTypeCreated.id, teamId, body, user, true);
}
diff --git a/apps/api/v2/src/modules/teams/event-types/services/teams-event-types.service.ts b/apps/api/v2/src/modules/teams/event-types/services/teams-event-types.service.ts
index a1e2003520d..79e28534eeb 100644
--- a/apps/api/v2/src/modules/teams/event-types/services/teams-event-types.service.ts
+++ b/apps/api/v2/src/modules/teams/event-types/services/teams-event-types.service.ts
@@ -133,6 +133,7 @@ export class TeamsEventTypesService {
});
const eventType = await this.teamsEventTypesRepository.getEventTypeById(eventTypeId);
+ this.logger.debug("nl debug - update team event type - eventType", JSON.stringify(eventType, null, 2));
if (!eventType) {
throw new NotFoundException(`Event type with id ${eventTypeId} not found`);