Move example logger helper to cross platform code.