slightly more efficient logging