Based on the generic Api logging system in APITestCase. Change-Id: I28c0bd41f585cca199fdef9a78e60ef66625d37f