mc log
The mc log command views and manages the API, error, and audit logs recorded internally by a MinIO AIStor deployment.
Use mc log to query recorded logs with time, node, bucket, and API filters, save results to a file for offline analysis, and manage each recorder’s configuration.
mc log reads logs from the internal log recorder, which must be enabled first.
To stream the server’s live log output instead, use mc admin logs.
Subcommands
mc log includes the following subcommands:
| Subcommand | Description |
|---|---|
api |
View and manage recorded API logs. |
error |
View and manage recorded error logs. |
audit |
View and manage recorded audit logs. |
Manage recorder configuration
Each subcommand can export the recorder’s current configuration to YAML with --get-config and apply an edited file back to the deployment with --set-config:
mc log api --get-config myaistor > api-config.yaml
mc log api --set-config api-config.yaml myaistor
The exported configuration differs by recorder:
| Recorder | Internal configuration keys |
|---|---|
api |
enable, retention, maintenanceInterval, orphanGracePeriod |
error |
enable, driveLimit, flushCount, flushInterval |
audit |
enable |
Save and replay logs
Use --out to save query results to a compressed file and --in to view them later without connecting to the deployment:
mc log audit --out audit-logs.zst myaistor
mc log audit --in audit-logs.zst