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 recorded logs

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:

SubcommandDescription
apiView and manage recorded API logs.
errorView and manage recorded error logs.
auditView 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:

RecorderInternal configuration keys
apienable, retention, maintenanceInterval, orphanGracePeriod
errorenable, driveLimit, flushCount, flushInterval
auditenable

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

On this page