mbs-octoml commented on a change in pull request #8788:
URL: https://github.com/apache/tvm/pull/8788#discussion_r694194725



##########
File path: include/tvm/runtime/logging.h
##########
@@ -409,6 +411,57 @@ inline bool DebugLoggingEnabled() {
   return state == 1;
 }
 
+/*!
+ * \brief Returns true if \p filename is mentioned in the environment
+ * variable \p TVM_LOG_DEBUG as enabled for 'verbose' logging at /p level.
+ * Levels go up to 9.
+ *
+ * To enable file \p foo.cc for level >= 2 and \p bar.cc for level >= 0 set:
+ *
+ * \code
+ * TVM_LOG_DEBUG="1;foo.cc=2;bar.cc=0;"
+ * \endcode
+ */
+bool VerboseLoggingEnabled(const char* filename, int level);

Review comment:
       The only advantage is you can switch it on and off per file. Eg I had to 
disable some existing DLOGs to not get overwhelmed, and found DLOGs I did add 
during development I then removed before checking since they were similarly 
verbose. This lets you add debugging logging at whatever detail you need to 
develop or fix and leave them there for the next time. Not committed, just 
testing if it speeds things up for me.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to