Apply new coding rule, add macro for logs & remove build warnings