New logging API

Change-Id: I7b2191e392033a839b8afbd1a8d325fb61b2410e