Add ability to send logs in debug mode

Change-Id: I1487bf2324f07b6a9c6f2b99c7ff98037a2736b4