[Lldb-commits] [PATCH] D65128: [Logging] Replace Log::Printf with LLDB_LOG macro (NFC)

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 22 18:59:25 PDT 2019


JDevlieghere added a comment.

In D65128#1596809 <https://reviews.llvm.org/D65128#1596809>, @jingham wrote:

> Actually, I don't want this change as is.  Some logs - like the expression and step logs - are laid out for readability, and LLDB_LOG automatically adds the file & function which will make them much harder to read.
>
> We need a variant that doesn't inject this information, and then this change should use that variant.  Or we can remove the file & function from LLDB_LOG and decide to let the people add those as they wish.  I don't have a strong opinion one way or the other, but I certainly don't want this extra noise in the step or expression logs.


I agree with you. I always use LLDB_LOG, but not because it includes the file and function, but because it's consistent, it gives me the ability to use the LLVM formatter, and I don't have to explicitly check whether the log is NULL or not. I can only speak for myself of course.

@labath Since you added the macro, what's your take on this? Do you care a lot about the file and function, and should we have two macros, one that includes this and one that doesn't? Or should we have just one macro, and have users decide whether they need this information or not?


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D65128





More information about the lldb-commits mailing list