If you read the code, you will notice that the FIRST time this error is encountered, it will always be logged.<p>The test in question is done frequently, and subsequent failures are about 100 times less interesting than the first. Unless you just like filling up disks with log files while your network is acting up.<p>Finally, note that the "_ok" flag will be RESET and the resolved condition logged once the test finally returns to succeeding.
I commented earlier, but I can't get over how ridiculous that line is. If you started by just writing the intent (!ok && rand() > .1) you actually have to work really hard to turn it into what you have there, and introduce a bug in the process.<p>Reminds me of this: <a href="http://www.osnews.com/story/19266/WTFs_m" rel="nofollow">http://www.osnews.com/story/19266/WTFs_m</a> - "Dude, WTF!"
If an exception was thrown, and _ok evaluates to false, then approximately 10% of the time, log the exception to the error log. Probably just to cut down on noise in the logs, or to account for brief periods of latency where the server appears down, but isn't.