sensor: capi: fix bugs with using invalid format in logs