From 4b9ffb8dc0a6c05a2a7c9e7ddb0c5a44df6b83ba Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 5 Mar 2024 05:38:27 +0000 Subject: [PATCH] logger --- .../backend/src/core/activitypub/ApDeliverManagerService.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/backend/src/core/activitypub/ApDeliverManagerService.ts b/packages/backend/src/core/activitypub/ApDeliverManagerService.ts index e161ac9973..2046d980d4 100644 --- a/packages/backend/src/core/activitypub/ApDeliverManagerService.ts +++ b/packages/backend/src/core/activitypub/ApDeliverManagerService.ts @@ -14,6 +14,7 @@ import type { IActivity } from '@/core/activitypub/type.js'; import { ThinUser } from '@/queue/types.js'; import { AccountUpdateService } from '@/core/AccountUpdateService.js'; import { UserKeypairService } from '../UserKeypairService.js'; +import Logger from '@/logger.js'; interface IRecipe { type: string; @@ -23,6 +24,8 @@ interface IFollowersRecipe extends IRecipe { type: 'Followers'; } +const logger = new Logger('deliver-manager', 'azure'); + interface IDirectRecipe extends IRecipe { type: 'Direct'; to: MiRemoteUser; @@ -114,6 +117,7 @@ class DeliverManager { */ const created = await this.userKeypairService.refreshAndprepareEd25519KeyPair(this.actor.id); if (created) { + logger.info(`ed25519 key pair created for user ${this.actor.id} and publishing to followers`); // リモートに配信 await this.accountUpdateService.publishToFollowers(this.actor.id, true); } @@ -160,6 +164,7 @@ class DeliverManager { // deliver await this.queueService.deliverMany(this.actor, this.activity, inboxes); + logger.info(`Deliver queues dispatched to ${inboxes.size} inboxes`); } }