# `mix ash_authentication.add_add_on.audit_log`
[🔗](https://github.com/team-alembic/ash_authentication/blob/main/lib/mix/tasks/ash_authentication.add_add_on.audit_log.ex#L7)

Adds an audit log add-on to your user resource

Track authentication events for security and compliance.

Also provisions `:audit_log_ip_salt` under your application: a distinct
generated value in `dev.exs` and `test.exs`, and a `runtime.exs` entry for
`:prod` which reads `AUDIT_LOG_IP_SALT` from the environment. The salt is
only used by `ip_privacy_mode :hash`, and is provisioned so that selecting
that mode later works without further setup.

## Example

```bash
mix ash_authentication.add_add_on.audit_log
```

## Options

* `--user`, `-u` -  The user resource. Defaults to `YourApp.Accounts.User`
* `--audit-log`, `-a` - The audit log resource name. Defaults to `<domain>.AuditLog`.
* `--include-fields` - Comma-separated list of sensitive fields to include in audit logs.
* `--exclude-strategies` - Comma-separated list of authentication strategies to exclude from logging.
* `--exclude-actions` - Comma-separated list of actions to exclude from logging.

# `data_layer_args`

# `igniter`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
