All Products
Search
Document Center

Simple Log Service:How do I delete logs?

Last Updated:May 15, 2024

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

Procedure

  1. Log on to the Simple Log Service console.

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

    image

  3. On the Log Storage > Logstores tab, move the pointer over your Logstore and choose 修改日志库 > Modify.

    image

  4. On the Logstore Attributes page, click Modify.

    image

  5. Modify the Data Retention Period parameter and click Save.

    When 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 all expired data within 1 hour. For example, if you change the data retention period from 5 days to 1 day, Simple Log Service deletes the logs of the previous four days within 1 hour.

References

For more information about how to resolve issues that may occur when you use Logstores, see FAQ about Logstores. For example, projects may fail to be deleted, logs may be lost, and log storage costs need to be reduced.