Fix up logging to avoid pedantic warnings