The log analysis feature allows you to export log query results to your computer. You can download logs on a page as a CSV file or download all logs as a TXT file. This topic describes how to export logs.


  1. Log on to the Cloud Firewall console.
  2. In the left-side navigation pane, choose Log Analysis > Log Analysis.
  3. Click the Logs tab. On the tab that appears, click the Raw Logs tab. In the upper-right corner of the tab that appears, click the Download icon icon.
  4. In the Log Download dialog box, select a download method to export log data.
    • Select Download Log in Current Page and click OK. Download Log in Current Page

      Logs on the current page are downloaded as a CSV file.

    • Select Download All Logs with Cloud Shell to download all log data. Download All Logs with Cloud Shell
      1. Click OK to go to the Cloud Shell command line.
      2. Follow the instructions that appear on the page to enter the required information.
      3. Specify a local path where you want to store the log file.

      After the operation is complete, all logs of Cloud Firewall are downloaded to your computer.

      Note Currently, Cloud Shell is deployed in the China (Shanghai) region. If the current Logstore is not in the China (Shanghai) region, downloading log data incurs data consumption fees. Click Log Service Pricing to learn more about the pricing of data usage.
    • Select Download All Logs Using Command Line Tool. Download All Logs Using Command Line Tool
      1. Click Documentation in the Log Download dialog box to learn how to install a command line tool.
      2. Install the command line tool.
      3. Click Security information management to view and copy the AccessKey ID and AccessKey secret of the current user.
      4. Click Copy Command and replace the AccessKey ID in step 2 and AccessKey secret in step 2 with those of the current user.
      5. Run the command in the CLI command line tool.

      If the command is successfully run, all logs are downloaded and saved to the download_data.txt file in the directory in which the command is run.