Not sure which version you are using. For me, I use this:
log.retention.hours=2147483647
It is approximately 245,000 years old. I believe that at some point I tried -1 , but used the maximum value. Perhaps log.retention.ms takes different values, but independently - the second of your configuration options should be sufficient. My guess is that no option is needed; either will be enough. Of course, the second in itself is enough.
source share