Make it possible to force log rotation

This is only for testing purpose.
Some slight cleanup
Merge pull request #2710 from chrisvest/2.2-very-slightly-expose-log-rotation

2.2 very slightly expose log rotation