I would like to roll my sonarqube log files once every month. I have read the comments in the configuration file, but they are not very clear.
There is the section that says, "or by month (“time:yyyy-MM)”
I would like for the logs to be rolled on the first of every month, but the way I am understanding how the configuration would work is if I configured the above line to read, “time:2022-04”, then the logs would roll on April 1, 2022.
What do I need to do to roll the logs on the first of every month?
sonar.log.rollingPolicy is not configured with a specific date, but using the placeholders (yyyy, MM, dd).
So configuration like
sonar.log.rollingPolicy=yyyy-MM (do not substitute real dates) would ensure that the rollover happens each month.
You can see the default behavior in action (as by default sonar.log.rollingPolicy is configured with yyyy-MM-dd, and if you have a SonarQube instance running for longer than a day you’ll see the logs roll at midnight each day).