All Products
Search
Document Center

Short Message Service:Export logs

Last Updated:Jan 17, 2025

The log analysis feature of Alibaba Cloud Short Message Service (SMS) allows you to download logs or query results to your local machine. You can select a time period and file format for download based on your business requirements.

Procedure

  1. Log on to the Short Message Service the console.

  2. In the left-side navigation pane, choose Analytics > Messaging Log Analysis.

  3. Click the O&M Center tab. On the Raw Logs sub-tab, move the pointer over the image icon and click Download Log.

    image

  4. In the Download Log dialog box, set the parameters based on your needs and click OK.

    Parameter

    Description

    Task Name

    The name of the download task.

    Log Quantity

    The number of logs that you want to download.

    Data Format

    The data format of the file to which you want to download logs. The CSV and JSON formats are supported.

    • If you select CSV, the column names in the file are generated based on the fields of the first 100 logs. If the subsequent logs contain new fields, the new fields are stored in the last column of the file in the JSON format. The name of the last column is left empty.

    • If you select JSON, each log is converted to the JSON format and written to the file as a single line.

    Quote

    The quote that is used to enclose special characters in logs. The enclosed special characters are not escaped.

    Download Inaccurate Results

    Specifies whether to download inaccurate results. If you select No, the download task fails when the query results are inaccurate.

    Compression Method

    The method that is used to compress logs. Valid values: gzip, lz4, zstd, and Uncompressed.

    If you want to download a large number of logs, we recommend that you select a compression method. This way, the log amount can be significantly reduced, and the logs can be quickly downloaded.

    Sorting Rule

    The rule that is used to sort logs.

    For more information, see Download logs.

  5. In the Download Tasks dialog box, wait until the download task enters the Successful state and click Download to download the logs to your local machine.

    You can also choose 下载日志 > Download Tasks on the Raw Logs sub-tab to open the Download Tasks dialog box and view the download records.