This topic describes how to export log query results to your computer by using the Log Service for WAF feature.
- Log on to the Web Application Firewall console.
- In the top navigation bar, select the resource group to which the instance belongs and the region, Mainland China or International, in which the instance is deployed.
- In the left-side navigation pane, choose .
- Click the Log Query tab, enter a query statement, and then click Search & Analyze.
- On the Raw Logs tab, click the download icon on the right.
Note If no query results are returned, the download icon does not appear.
- In the Log Download dialog box, select Download Log in Current Page or Download all logs in the CLI console.
- Download Log in Current Page: After you select this option button, click OK to export the raw log data queried on the current page as a CSV file to your computer.
- Download all logs in the CLI console
- Install the command-line interface (CLI). For more information, see User Guide.
- Go to the Security Management page. Then, view and record the AccessKey ID and AccessKey secret of the current user.
- Click Copy command and paste the command in the CLI. Replace
AccessID obtained in Step 2and
AccessKey obtained in Step 2with the AccessKey ID and AccessKey secret of the current user. Then, run the command.
All the raw log data of WAF is automatically downloaded and saved to the download_data.txt file in the directory where the command is run.