Server Logging

AIStor Server publishes its server logs to the system console. These logs can include errors, information output, or other information useful during troubleshooting or debugging.

Server logs do not emit for all operations and cannot support audit trail or similar compliance requirements. If you require such a trail, configure and use audit logging instead.

You can read the server logs using any of the following methods:

  • Run journalctl -u minio from any host machine.
  • Run mc admin logs against the MinIO AIStor deployment.

Record logs to disk

New feature — opt-in only
Disk-based log recording is a new feature that is disabled by default. Enable it only after thorough testing at scale with your application workload. MinIO is actively optimizing this feature in subsequent releases.

MinIO AIStor can record API, error, and audit logs directly to disk as compressed JSON files. This complements webhook-based logging for compliance, forensics, and offline analysis. Logs are stored internally and managed automatically by MinIO AIStor.

Log Type Purpose
API S3 API request/response logs
Error Server error logs
Audit Comprehensive audit trail

Environment variables

Configure log recording by setting environment variables before starting MinIO AIStor.

API log recording:

export MINIO_LOG_API_INTERNAL_ENABLE="on"
export MINIO_LOG_API_INTERNAL_DRIVE_LIMIT="1Gi"
export MINIO_LOG_API_INTERNAL_FLUSH_COUNT="10000"
export MINIO_LOG_API_INTERNAL_FLUSH_INTERVAL="1h"
Variable Default Description
MINIO_LOG_API_INTERNAL_ENABLE off Enable API log recording.
MINIO_LOG_API_INTERNAL_DRIVE_LIMIT 1Gi Maximum disk space for API logs.
MINIO_LOG_API_INTERNAL_FLUSH_COUNT 10000 Log entries before flushing.
MINIO_LOG_API_INTERNAL_FLUSH_INTERVAL 1h Time interval before flushing.

Error log recording:

export MINIO_LOG_ERROR_INTERNAL_ENABLE="on"
export MINIO_LOG_ERROR_INTERNAL_DRIVE_LIMIT="1Gi"
export MINIO_LOG_ERROR_INTERNAL_FLUSH_COUNT="10000"
export MINIO_LOG_ERROR_INTERNAL_FLUSH_INTERVAL="1h"
Variable Default Description
MINIO_LOG_ERROR_INTERNAL_ENABLE off Enable error log recording.
MINIO_LOG_ERROR_INTERNAL_DRIVE_LIMIT 1Gi Maximum disk space for error logs.
MINIO_LOG_ERROR_INTERNAL_FLUSH_COUNT 10000 Log entries before flushing.
MINIO_LOG_ERROR_INTERNAL_FLUSH_INTERVAL 1h Time interval before flushing.

Audit log recording:

export MINIO_LOG_AUDIT_INTERNAL_ENABLE="on"
Variable Default Description
MINIO_LOG_AUDIT_INTERNAL_ENABLE off Enable audit log recording.

When the configured drive limit is reached (for API and error logs), MinIO AIStor automatically removes the oldest log files to make room for new entries.

Publish server logs to HTTP webhook

MinIO AIStor supports publishing logs to a webhook consumer through an HTTP PUT operation, where the body of the request is the log as a JSON document.

You can configure a new HTTP webhook endpoint to which AIStor Server publishes minio server logs using either environment variables or runtime configuration settings:

For options that require specifying a directory path, ensure the minio-user user and group have read, write, and list access to those resources. Where possible use chown and chmod to limit access and ownership to only the minio-user.

Restart MinIO AIStor to apply the new settings.

You can specify multiple webhook loggers by appending a unique identifier to each group of environment variables or settings. For example, MINIO_LOGGER_WEBHOOK_ENDPOINT_PRIMARY or mc admin config set alias logger_webhook:primary.

Server log JSON format

The following example json document resembles the format used by MinIO AIStor for webhook logging:

{
    "deploymentid": "c8484a3f-2fb0-416b-b0dd-06c7c60a6925",
    "level": "WARNING",
    "time": "2025-08-15T16:06:01.16308316Z",
    "api": {
        "name": "SYSTEM.iam",
        "args": {}
    },
    "error": {
        "message": "Enabling MINIO_IDENTITY_TLS_SKIP_VERIFY is not recommended in a production environment (*errors.errorString)",
        "source": [
            "internal/logger/logger.go:271:logger.LogIf()",
            "cmd/logging.go:29:cmd.iamLogIf()",
            "cmd/iam.go:270:cmd.(*IAMSys).Init()",
            "cmd/server-main.go:1006:cmd.serverMain.func15.1()",
            "cmd/server-main.go:566:cmd.bootstrapTrace()",
            "cmd/server-main.go:1005:cmd.serverMain.func15()"
        ]
    }
}