JDevlieghere added a comment.

In D135621#3850248 <https://reviews.llvm.org/D135621#3850248>, @clayborg wrote:

> I am also questioning if the these even belong in the LLDB logging stuff? 
> Seems like it would be just as easy to create a diagnostic message by calling 
> Diagnostics::Report(...). Do we really want to modify the log channels here? 
> Seems like always on diagnostics should just a dedicated API.

I expect the majority of places where we want to log to the diagnostic log 
channel to be places where we already log today. It being a its own log channel 
complicates that somewhat, because unlike categories you can't do 
`GetLog(LLDB::Expression | Diagnostics::Expression)`. That's still pretty 
important to us, so I've added two more macros that allow you to specify 
multiple log channels to achieve a somewhat similar result:

  LOG_MULTI_PRINTF(GetLog(LLDBLog::Expression), GetLog(Diagnostics::Foo), "%s", 
foo)

Similarly, I also plan to change `LLDB_LOG_ERROR` to always log to the 
diagnostic channel. I didn't include it in this patch as it requires moving the 
macro in the diagnostics header and generates a lot of churn.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135621/new/

https://reviews.llvm.org/D135621

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to