All Products
Search
Document Center

CDN:Configure real-time log delivery

Last Updated:Aug 21, 2026

The real-time log delivery feature collects logs from specified accelerated domain names in specific regions and delivers them to Simple Log Service (SLS). This feature lets you analyze logs in real time to monitor your services and troubleshoot issues.

Prerequisites

Ensure that you have activated SLS.

Key concepts

  • Domain name migration: When you migrate log delivery for a domain name from logstore1 to logstore2, log delivery to logstore1 continues until the migration is complete. Then, delivery seamlessly switches to logstore2 without interruption.

    Important

    If you migrate an accelerated domain name from one account to another, you must first disable real-time log delivery for that domain name in the original account. After the migration is complete, create a new real-time log delivery task for the domain name in the new account. Otherwise, logs will continue to be delivered to the original account, and that account will continue to be charged.

  • Pause and resume service: The association between a Logstore and a domain name is preserved even if you pause delivery. You can stop or restart data delivery for a specific LogStore or domain name at any time.

  • Data query: You can query all log data for a specific user within a time range, or query all data delivered to a specific LogStore.

Procedure

  1. Log on to the CDN console.

  2. In the left-side navigation pane, choose Logs > Real-time Logs.

  3. On the Real-time Logging tab, click Activate Real-Time Log Push Service.

  4. In the Create Real-time Log Delivery Task dialog box, follow the on-screen instructions to configure SLS parameters.

    Parameter

    Description

    Project Name

    The name of the Project to create in Simple Log Service. The name must be unique across all your Projects in the SLS console.

    Logstore Name

    A Logstore is a resource collection within a Project that stores data from a single data source. Log data is queried, analyzed, and delivered on a per-LogStore basis. If you do not specify a name, CDN generates one for you.

    region

    The region of the destination SLS LogStore.

    Log Service Authorization

    After you click Authorize, you are redirected to the Resource Access Management (RAM) console. Click Agree to Authorize to grant the AliyunCDNLogArchiveRole role.

  5. After authorization is successful, click Next.

  6. Select one or more accelerated domain names, accept the billing terms, and then click Create.

    Note
    • The real-time log delivery list displays only LogStores managed by CDN, not all LogStores in your account.

    • You can associate up to five accelerated domain names at a time.

    • After data delivery to the LogStores begins, you can view four default reports in the CDN console.

  7. Click OK.

    On the Real-time Log Data tab, you can view the number of successful and failed delivery attempts.

Best practices

To learn how to use the log analysis module and perform common user access analysis, see Deliver CDN real-time logs to SLS for user access analysis.

Related APIs

You can call the following API operations to manage real-time log delivery.

API

Description

CreateRealTimeLogDelivery

Creates a real-time log delivery task for an accelerated domain name.

DescribeDomainRealtimeLogDelivery

Queries the real-time log delivery information for an accelerated domain name.

DescribeRealtimeDeliveryAcc

Queries the number of real-time log delivery attempts.

DisableRealtimeLogDelivery

Disables real-time log delivery for an accelerated domain name.

EnableRealtimeLogDelivery

Enables real-time log delivery for an accelerated domain name.

ListRealtimeLogDeliveryDomains

Queries all accelerated domain names associated with the real-time log delivery service.

ModifyRealtimeLogDelivery

Modifies the real-time log delivery task for an accelerated domain name. An accelerated domain name can deliver logs to only one Logstore.

ListRealtimeLogDeliveryInfos

Queries information about all real-time log delivery tasks.

DeleteRealtimeLogDelivery

Deletes a real-time log delivery task for an accelerated domain name.