> In doLog, the sample rate test should be mixed in the tlogfile condition
> so as to avoid calling rand if there is no logging anyway.
>
> if (tlogfile && sample_rate != 0 && ...)
Oops, wrong logic. Rather:
if (tlogfile && (sample_rate == 0 || ... random stuff))
--
Fabien.