The WAF log query and analysis service enables you to export log query results to a local file.

You can export the log entries on the current page to a CSV file, or export all log entries to a TXT file.

Procedure

  1. Log on to the Web Application Firewall console and choose App Market > App Management.
  2. Click the log query and analysis service area to open the Log Service page.
  3. On the Raw Logs tab of the Log Service page, click the download button on the right.
    Note The download button does not appear if no result is found for a query.
  4. In the Download Log dialog box that appears, select Download Log in Current Page or Download all logs in the CLI console.
    • Download Log in Current Page : Click OK to download the raw log entries on the current page to a CSV file.
    • Download all logs in the CLI console
      1. For more information about installing the command-line interface (CLI), see the CLI guide.
      2. Go to the Security Management page, and find the AccessKey ID and AccessKey Secret of the current user.
      3. Click Copy Command and paste the command into CLI, replace the AccessID obtained in step 2 and AccessKey obtained in step 2 with the AccessKey ID and AccessKey Secret of the current user, and then run the command.


      All raw log entries recorded by WAF are automatically downloaded and saved to the download_data.txt file in the directory where the command is run.