Add conditional log support