<div dir="ltr">Thank you for the link to the previous discussion and the description of the Windows logging. I like the idea of the macro based logging on Windows but agree that the explicit log channel definition is a bit too verbose.<div><br></div><div>Currently I would prefer a mixed solution with 'Log* log = ...; LOG_IF(log, "pattern", ...);' for the usual case and 'Log* log = ...; LOG_IF_ANY(log, categories, "pattern", ...);' if we want to log to different log channels. I believe it will improve the readability quite a lot, but would only make sense if we can apply it to the full code base within a reasonably short period of time to avoid confusion with the multiple log patterns.</div><div><br></div><div>Tamas</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 12, 2015 at 7:00 PM Zachary Turner via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">After the previous discussion I agree that evaluating the arguments is unacceptable.  But you are correct here that a macro would solve this.  In fact, most C++ log libraries use macros I guess for this very reason.  <div><br></div><div>I decided to make some macros for the windows plugin which you can look at it in ProcessWindowsLog.h.</div><div><br></div><div>There are some issues that are not obvious how to solve though.  For example, the macros I wrote in ProcessWindowsLog cannot be used outside of my plugin.  This is because each plugin statically defines its own channels as well as defines its own global Log object.  If this were to be done in a way that there were one set of macros that all current and future generic code and plugins could use, I think it would require a fairly substantial refactor.</div></div><div dir="ltr"><div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 12, 2015 at 6:11 AM Vince Harron via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">We could solve booth the efficiency concerns and the conciseness with a macro.  (Gasp!)</p>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
</blockquote></div></div></div>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
</blockquote></div>