Deprecate logPosts and use DEBUG flag