diff --git a/examples/app-showcase/src/data/hooks/index.ts b/examples/app-showcase/src/data/hooks/index.ts index 68a16be3c9..a423bb1b5d 100644 --- a/examples/app-showcase/src/data/hooks/index.ts +++ b/examples/app-showcase/src/data/hooks/index.ts @@ -47,7 +47,7 @@ export const AuditTaskCompletionHook = { condition: "record.done == true", body: { language: 'js' as const, - source: "var r = ctx.result || ctx.input || {}; if (typeof ctx.log === 'function') ctx.log('task completed: ' + (r.title || r.id || 'unknown'));", + source: "var r = ctx.result || ctx.input || {}; ctx.log.info('task completed: ' + (r.title || r.id || 'unknown'));", capabilities: ['log'] as ('log')[], }, async: true, @@ -70,7 +70,7 @@ export const WarnOverBudgetHook = { condition: "has(record.spent) && has(record.budget) && record.spent > record.budget", body: { language: 'js' as const, - source: "var r = ctx.result || ctx.input || {}; if (typeof ctx.log === 'function') ctx.log('project over budget: ' + (r.name || r.id || 'unknown') + ' (' + r.spent + ' / ' + r.budget + ')');", + source: "var r = ctx.result || ctx.input || {}; ctx.log.warn('project over budget: ' + (r.name || r.id || 'unknown') + ' (' + r.spent + ' / ' + r.budget + ')');", capabilities: ['log'] as ('log')[], }, async: true,