# tf.compat.v1.logging.log_if

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/platform/tf_logging.py#L299-L303) |

Log 'msg % args' at level 'level' only if condition is fulfilled.

    tf.compat.v1.logging.log_if(
        level, msg, condition, *args
    )