From 70dba0c66b6104064fef7f869038c5d9ddcaa66a Mon Sep 17 00:00:00 2001 From: Siddharth Singh Date: Sun, 30 Mar 2025 14:28:13 +0530 Subject: [PATCH] only log custom policy path if we're actually using a script to load the policy --- packages/ditto/workers/policy.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/ditto/workers/policy.ts b/packages/ditto/workers/policy.ts index 6cddd0a0..2d732ee1 100644 --- a/packages/ditto/workers/policy.ts +++ b/packages/ditto/workers/policy.ts @@ -53,15 +53,17 @@ export class PolicyWorker implements NPolicy { path: conf.policy, databaseUrl: conf.databaseUrl, pubkey: await conf.signer.getPublicKey(), + mode: conf.policyMode }); - - logi({ - level: 'info', - ns: 'ditto.system.policy', - msg: 'Using custom policy', - path: conf.policy, - enabled: true, - }); + if (conf.policyMode === "script") { + logi({ + level: 'info', + ns: 'ditto.system.policy', + msg: 'Using custom policy', + path: conf.policy, + enabled: true, + }); + } } catch (e) { if (e instanceof Error && e.message.includes('Module not found')) { logi({