diff options
-rw-r--r-- | tensorflow/core/util/event.proto | 6 | ||||
-rw-r--r-- | tensorflow/python/training/tensorboard_logging.py | 2 | ||||
-rw-r--r-- | tensorflow/python/training/tensorboard_logging_test.py | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/tensorflow/core/util/event.proto b/tensorflow/core/util/event.proto index 5c3a88a2d7..5c3799c132 100644 --- a/tensorflow/core/util/event.proto +++ b/tensorflow/core/util/event.proto @@ -43,7 +43,11 @@ message Event { message LogMessage { enum Level { UNKNOWN = 0; - DEBUG = 10; + // Note: The logging level 10 cannot be named DEBUG. Some software + // projects compile their C/C++ code with -DDEBUG in debug builds. So the + // C++ code generated from this file should not have an identifier named + // DEBUG. + DEBUGGING = 10; INFO = 20; WARN = 30; ERROR = 40; diff --git a/tensorflow/python/training/tensorboard_logging.py b/tensorflow/python/training/tensorboard_logging.py index 352e4c308c..b275d2f682 100644 --- a/tensorflow/python/training/tensorboard_logging.py +++ b/tensorflow/python/training/tensorboard_logging.py @@ -56,7 +56,7 @@ _summary_writer = _sentinel_summary_writer # Map from the tensorboard_logging logging enum values to the proto's enum # values. _LEVEL_PROTO_MAP = { - DEBUG: event_pb2.LogMessage.DEBUG, + DEBUG: event_pb2.LogMessage.DEBUGGING, INFO: event_pb2.LogMessage.INFO, WARN: event_pb2.LogMessage.WARN, ERROR: event_pb2.LogMessage.ERROR, diff --git a/tensorflow/python/training/tensorboard_logging_test.py b/tensorflow/python/training/tensorboard_logging_test.py index cc5cefffb4..5af6a0aa7b 100644 --- a/tensorflow/python/training/tensorboard_logging_test.py +++ b/tensorflow/python/training/tensorboard_logging_test.py @@ -94,7 +94,7 @@ class EventLoggingTest(test.TestCase): tensorboard_logging.debug("debug") self.assertLoggedMessagesAre([(event_pb2.LogMessage.ERROR, "error"), - (event_pb2.LogMessage.DEBUG, "debug")]) + (event_pb2.LogMessage.DEBUGGING, "debug")]) # All message should be logged because tensorboard_logging verbosity doesn't # affect logging verbosity. self.assertEqual(3, self.logged_message_count) |