Logging: Fix a bug in flush

Signed-off-by: Paul Harrison <pharrison@mythtv.org>