Merge "Fix log function for potential overflow" am: 2e5c7798e1 am: 10155def9a
am: 0b0f69aecb

Change-Id: Ie45cdddbf69261564c11cd2c8c781ef2391e500e