Fixes a few things

Massive thanks to bigrushdog: https://github.com/codefireXperiment/device_htc_m7-common/blob/9cc4e2b6c3523548e730cbc0f6b6d08075bf2fbc/gps/utils/log_util.h