Changing log method to be a macro