Hello.
I want to ask what can be done so that the old logs are automatically deleted?
Log storage path:
/tmp/confluent.861681/kafka/logs
Unfortunately, the logs accumulate and are not deleted by themselves.
[root@inf-kfans-tt01 logs]# ls -lh
total 202M
-rw-rw-r--. 1 kafka kafka 5.8K Feb 17 09:53 controller.log
-rw-rw-r--. 1 kafka kafka 6.4K Feb 16 07:59 controller.log.2022-02-16-07
-rw-rw-r--. 1 kafka kafka 6.4K Feb 16 08:59 controller.log.2022-02-16-08
-rw-rw-r--. 1 kafka kafka 6.4K Feb 16 20:55 controller.log.2022-02-16-20
-rw-rw-r--. 1 kafka kafka 1.6K Feb 16 21:10 controller.log.2022-02-16-21
-rw-rw-r--. 1 kafka kafka 65K Feb 17 05:58 controller.log.2022-02-17-05
-rw-rw-r--. 1 kafka kafka 102K Feb 17 06:55 controller.log.2022-02-17-06
-rw-rw-r--. 1 kafka kafka 104K Feb 17 07:58 controller.log.2022-02-17-07
-rw-rw-r--. 1 kafka kafka 6.4K Feb 17 08:58 controller.log.2022-02-17-08
-rw-rw-r--. 1 kafka kafka 0 Feb 11 10:32 kafka-authorizer.log
-rw-rw-r--. 1 kafka kafka 0 Feb 11 10:32 kafka-request.log
-rw-rw-r--. 1 kafka kafka 1003K Feb 17 09:55 kafkaServer-gc.log
-rw-rw-r--. 1 kafka kafka 12M Feb 16 11:01 kafkaServer-gc.log.0
-rw-rw-r--. 1 kafka kafka 19K Feb 16 11:02 kafkaServer-gc.log.1
-rw-rw-r--. 1 kafka kafka 370K Feb 16 11:37 kafkaServer-gc.log.2
-rw-rw-r--. 1 kafka kafka 19K Feb 16 11:39 kafkaServer-gc.log.3
-rw-rw-r--. 1 kafka kafka 5.4M Feb 16 21:15 kafkaServer-gc.log.4
-rw-rw-r--. 1 kafka kafka 141K Feb 17 06:05 kafkaServer-gc.log.5
-rw-rw-r--. 1 kafka kafka 19K Feb 17 06:06 kafkaServer-gc.log.6
-rw-rw-r--. 1 kafka kafka 468K Feb 17 07:20 kafkaServer-gc.log.7
-rw-rw-r--. 1 kafka kafka 17K Feb 17 07:21 kafkaServer-gc.log.8
-rw-rw-r--. 1 kafka kafka 1.1K Feb 17 07:32 log-cleaner.log
-rw-rw-r--. 1 kafka kafka 1.1K Feb 14 17:34 log-cleaner.log.2022-02-14-17
-rw-rw-r--. 1 kafka kafka 1.1K Feb 15 11:24 log-cleaner.log.2022-02-15-11
-rw-rw-r--. 1 kafka kafka 6.6K Feb 15 13:55 log-cleaner.log.2022-02-15-13
-rw-rw-r--. 1 kafka kafka 6.6K Feb 15 15:07 log-cleaner.log.2022-02-15-15
-rw-rw-r--. 1 kafka kafka 2.2K Feb 16 11:40 log-cleaner.log.2022-02-16-11
-rw-rw-r--. 1 kafka kafka 172 Feb 17 05:53 log-cleaner.log.2022-02-17-05
-rw-rw-r--. 1 kafka kafka 1.1K Feb 17 06:30 log-cleaner.log.2022-02-17-06
-rw-rw-r--. 1 kafka kafka 58K Feb 17 09:55 metadata-service.log
-rw-rw-r--. 1 kafka kafka 62K Feb 15 10:59 metadata-service.log.2022-02-15-10
-rw-rw-r--. 1 kafka kafka 62K Feb 16 20:59 metadata-service.log.2022-02-16-20
-rw-rw-r--. 1 kafka kafka 16K Feb 16 21:15 metadata-service.log.2022-02-16-21
-rw-rw-r--. 1 kafka kafka 2.5K Feb 17 05:53 metadata-service.log.2022-02-17-05
-rw-rw-r--. 1 kafka kafka 27K Feb 17 06:59 metadata-service.log.2022-02-17-06
-rw-rw-r--. 1 kafka kafka 42K Feb 17 07:59 metadata-service.log.2022-02-17-07
-rw-rw-r--. 1 kafka kafka 61K Feb 17 08:59 metadata-service.log.2022-02-17-08
-rw-rw-r--. 1 kafka kafka 102K Feb 17 09:54 server.log
-rw-rw-r--. 1 kafka kafka 71M Feb 16 21:15 server.log.2022-02-16-21
-rw-rw-r--. 1 kafka kafka 16M Feb 17 05:59 server.log.2022-02-17-05
-rw-rw-r--. 1 kafka kafka 95M Feb 17 07:59 server.log.2022-02-17-07
-rw-rw-r--. 1 kafka kafka 179K Feb 17 08:57 server.log.2022-02-17-08
-rw-rw-r--. 1 kafka kafka 95K Feb 17 07:32 state-change.log
-rw-rw-r--. 1 kafka kafka 94K Feb 14 15:07 state-change.log.2022-02-14-15
-rw-rw-r--. 1 kafka kafka 94K Feb 14 17:34 state-change.log.2022-02-14-17
-rw-rw-r--. 1 kafka kafka 95K Feb 15 11:24 state-change.log.2022-02-15-11
-rw-rw-r--. 1 kafka kafka 189K Feb 16 11:40 state-change.log.2022-02-16-11
-rw-rw-r--. 1 kafka kafka 95K Feb 17 05:53 state-change.log.2022-02-17-05
-rw-rw-r--. 1 kafka kafka 95K Feb 17 06:30 state-change.log.2022-02-17-06
Here are the settings server.properties
log.dirs=/tmp/kafka-logs
log.cleaner.enable=true
log.retention.hours=2
log.cleanup.policy=compact,delete
segment.bytes=104857600
retention.ms=300000
log.segment.bytes=104857600
log.retention.check.interval.ms=300000
What did I forget to add?