change log_loggable() as macro