My question is related to the buildDiscarder option. I am aware that jenkins core contains the LogRotator as a default buildDiscarder extension implementation. I have observed that if I include buildDiscarder in my declarative pipeline options directive, the LOGGER.log(FINE message at line 149 of the LogRotator will display information twice to the logger. I have observed that if I do not include buildDiscarder in my options directive the message does not appear in the logger.
I do not understand the extension mechanism and I have a couple questions. I see LogRotator extend BuildDiscarder but I do not understand what happens to the LogRotator class when the options directive appears or does not appear. When I say what happens I mean whether the LogRotator class is instantiated or not, what happens to the buildDiscarder extension point with respect to the 4 num to keep and days to keep value and how that affects the logs and artifacts for that job, i.e. is there a jenkins global default when the LogRotator is not instantiated.
I thank you for your time.