dhis2_clear_audit_log
Clear DHIS2 audit logs to manage system performance and storage. Requires confirmation to ensure safe deletion of log data.
Instructions
Clear the audit log (requires confirmation)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirmed | No | Set to true to confirm clearing the audit log |
Implementation Reference
- src/index.ts:1479-1487 (handler)The main handler for the 'dhis2_clear_audit_log' tool. It calls auditLogger.clear() to clear the audit log entries and returns a success confirmation message.case 'dhis2_clear_audit_log': auditLogger.clear(); return { content: [{ type: 'text', text: `🗑️ Audit log cleared successfully.` }] };
- src/audit-logger.ts:106-109 (helper)The clear() method in AuditLogger class that empties the in-memory audit entries array and logs the clearance to console.clear(): void { this.entries = []; console.log('[AUDIT] Audit log cleared'); }