This PR adds a new config option “shrinkdebugfilesize=” which accepts an integer specifying the file size of the debug log in megabytes. This option can be specified alongside “shrinkdebugfile=1” (which is the default) and when shrinking the debug log, it will now shrink it to the size specified.
The default size for debug.log shrinking is still 10 MB.
I was working on a tool to analyze IBD times and my log kept shrinking if I wanted to change settings or needed to reboot for some reason. This was causing lost data and I didn’t want to let the log grow forever by setting shrinkdebugfile=0. That way I could leave it on passively and do post-analysis.