<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Mar 8, 2013, at 6:23 AM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">On Fri, Mar 8, 2013 at 4:32 AM, Argyrios Kyrtzidis <<a href="mailto:akyrtzi@gmail.com">akyrtzi@gmail.com</a>> wrote:<br><blockquote type="cite">+void clang_findIncludesInFile(CXTranslationUnit TU, CXFile file,<br>+                              CXCursorAndRangeVisitor visitor) {<br>+  LogRef Log = Logger::make(LLVM_FUNCTION_NAME);<br>+<br>+  if (!TU) {<br>+    if (Log)<br>+      *Log << "Null CXTranslationUnit";<br>+    return;<br>+  }<br></blockquote><br>Hi Argyrios,<br><br>The libclang logging infrastructure is essentially used to implement<br>"libclang debug mode" that we were discussing, right?  I could add<br>logging to functions in CXComment.cpp, where instead of failing we<br>return a safe-but-nonsense value.  What is your opinion on this?<br></div></blockquote><div><br></div><div>I fully endorse more logging, the more the merrier :-)</div><div><br></div><div>At some point I want to add different "detail level" for each logger, so then we can specify something like LIBCLANG_LOGGING=<detail level> and choose how "noisy" we want the logging.</div><div>(also it'd be nice having a way to specify the set of functions you only want logging for).</div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><br>Dmitri<br><br>--<span class="Apple-converted-space"> </span><br>main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/</div></blockquote></div><br></body></html>