[**Documentation**](../../../README)

***

[Documentation](../../../README) / [@zerotal/audit](../README) / registerAudit

# Function: registerAudit()

> **registerAudit**(`ModelClass`): `void`

Defined in: [audit/src/Auditable.ts:63](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/audit/src/Auditable.ts#L63)

Wire audit observation onto a model class against the live Auditor.

Called by `AuditProvider.onBooted()` for each `Auditable`-composed class. Also
usable programmatically for a model you'd rather not wrap in the mixin — set the
static `auditExcept` / `auditOnly` / `auditType` fields to configure it.

Must run after the container has resolved the "audit" binding (i.e. in onBooted()).

## Parameters

### ModelClass

`ModelClass`

## Returns

`void`
