Home > @opengovsg/logging > AuditLogger
AuditLogger interface
The fixed-shape **audit** helper layer — logger.audit.<category>.<event>(…).
Each method records one auditable business event from a closed, governed taxonomy (ADR-0007). Unlike the free-form base logger, every event has a *fixed, type-enforced shape*: required fields are mandatory at compile time, shared identity is read from the bound scope, and the helper stamps the Controlled wire fields audit, category, and event.
The helper performs **no value transformation**: secrets are kept out *by shape* (they are never fields) and PII is left to the sink. See ADR-0007.
Signature:
typescript
export interface AuditLoggerProperties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| apiUsage | ApiUsageAudit | API usage events — token lifecycle and sensitive-endpoint access. | |
| authn | AuthnAudit | Authentication & session events. | |
| configChange | ConfigChangeAudit | Application function & security-configuration change events. | |
| dataAccess | DataAccessAudit | Data access, movement & export events. | |
| failures | FailuresAudit | Security failures — handled, security-relevant denials. | |
| resource | ResourceAudit | Resource/entity lifecycle — create, update, delete, ownership transfer. | |
| userManagement | UserManagementAudit | User & permission management events. |