This topic describes how to export log query results to your local device by using Log Service for WAF.
- 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 .
- On the Log Service page, click the Log Query tab, enter a query statement, and click Search & Analyze.
- On the Raw Logs tab, click the download icon on the right.
Note The download icon is not displayed if no query result is found.
- 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 radio button, click OK to export raw log data that is queried on the current page as a CSV file to your local device.
- Download all logs in the CLI console
- Install the CLI. For more information, see User Guide.
- Go to the Security Management page and 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, and run the command.
All raw log data that is recorded by WAF is automatically downloaded and saved to the download_data.txt file in the directory where the command was run.