better logging for event policy

This commit is contained in:
Siddharth Singh 2025-04-03 18:38:44 +05:30
parent adcaa207d9
commit 889d36c7d6
No known key found for this signature in database

View file

@ -55,15 +55,13 @@ export class PolicyWorker implements NPolicy {
pubkey: await conf.signer.getPublicKey(),
mode: conf.policyMode,
});
if (conf.policyMode === 'script') {
logi({
level: 'info',
ns: 'ditto.system.policy',
msg: 'Using custom policy',
path: conf.policy,
msg: `Using ${conf.policyMode === 'script' ? 'custom' : 'event'} policy`,
path: conf.policyMode === 'script' ? conf.policy : undefined,
enabled: true,
});
}
} catch (e) {
if (e instanceof Error && e.message.includes('Module not found')) {
logi({