diff --git a/tensorflow/python/ops/logging_ops.py b/tensorflow/python/ops/logging_ops.py index e9fb6e0ac2db4820ca95910a39370754f48d7757..55e8b56a7fa1adff6395730dbb376cc08b792128 100644 --- a/tensorflow/python/ops/logging_ops.py +++ b/tensorflow/python/ops/logging_ops.py @@ -23,6 +23,7 @@ import pprint import random import sys +from absl import logging import six from tensorflow.python import pywrap_tensorflow @@ -221,10 +222,10 @@ def print_v2(*inputs, **kwargs): ways), and printable python objects. output_stream: The output stream, logging level, or file to print to. Defaults to sys.stderr, but sys.stdout, tf.compat.v1.logging.info, - tf.compat.v1.logging.warning, and tf.compat.v1.logging.error are also - supported. To print to - a file, pass a string started with "file://" followed by the file path, - e.g., "file:///tmp/foo.out". + tf.compat.v1.logging.warning, tf.compat.v1.logging.error, + absl.logging.info, absl.logging.warning and absl.loogging,error are also + supported. To print to a file, pass a string started with "file://" + followed by the file path, e.g., "file:///tmp/foo.out". summarize: The first and last `summarize` elements within each dimension are recursively printed per Tensor. If None, then the first 3 and last 3 elements of each dimension are printed for each tensor. If set to -1, it @@ -268,6 +269,15 @@ def print_v2(*inputs, **kwargs): tf_logging.warn: "log(warning)", tf_logging.ERROR: "log(error)", tf_logging.error: "log(error)", + logging.INFO: "log(info)", + logging.info: "log(info)", + logging.INFO: "log(info)", + logging.WARNING: "log(warning)", + logging.WARN: "log(warning)", + logging.warning: "log(warning)", + logging.warn: "log(warning)", + logging.ERROR: "log(error)", + logging.error: "log(error)", } if _is_filepath(output_stream):