Log first, then encoding optional?