More informative logging in codeSnippet()

Change-Id: I6909ed60b39a65e6a6464427b2f839aa2bff3863