Usage#
typescript
import { auditLog, auditMiddleware } from '@AxilJS/cloud'
auditLog({
action: 'user.login',
actor: { id: user.id, type: 'user' },
tenantId: tenant.id,
success: true
})
app.use(auditMiddleware())Events are emitted on the global event bus for flexible storage.