All Products
Search
Document Center

Simple Log Service:How do I delete logs?

Last Updated:Mar 27, 2024

You can delete logs only by adjusting the data retention period of a Logstore. If the retention period of a log reaches the specified data retention period of the Logstore, the log is deleted. This topic describes how to adjust the data retention period of a Logstore.

  1. Log on to the Simple Log Service console.

  2. In the Projects section, click the project that you want to manage.

    image

  3. Choose Log Storage > Logstores. On the Logstores tab, move the pointer over the Logstore that you want to manage and choose Modify a Logstore > Modify.

  4. On the Logstore Attributes page, click Modify.image.png

  5. Change the value of the Data Retention Period parameter and click Save.

    If the retention period of a log reaches the specified data retention period of the Logstore, the log is deleted.

    Important

    If you shorten the data retention period, Simple Log Service deletes data based on the new retention period within 1 hour. For example, if you change the value of the Data Retention Period parameter from 5 to 1, Simple Log Service deletes the logs of the previous four days within 1 hour after the change.