Talk to the bear

In the great tradition of explaining your problem to someone else as a way of fixing it yourself without their help…

I’ve nailed the rotating file log 16010101 bug! The problem was to do with the fact that when there was a new log ready for use and a log message switched it to be the active log it also set the ’next log time’ to zero. If a time change notification came along just after this, whilst the ’next log time’ was zero then it created a new log due to a bug in the time change handler; a test was missing a ’next log time != 0’ test…

Interestingly, for me at least, this was the fix that I initially thought was required when I started investigating the problem yesterday. I didn’t put the fix in as I couldn’t reproduce the actual sequence of events that would lead to it actually being a fix and not just a random act of hopeful hackery. Anyway, after writing the last blog posting I worked out what was going wrong, knocked up a test that proved it and uncommented my ‘fix’ and it did indeed fix the problem.

Yay me! ;)