Add logging begin and end markers