[Lldb-commits] [PATCH] D27459: Straw-man proposal for new logging syntax

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 6 09:57:47 PST 2016


jingham added a comment.

I not infrequently have some non-trivial code in the "if (log)" block that gathers the information that I am then going to print, or loops over entities printing them.  Putting more complex code like that inside a macro looks awful and is hard to debug.  I don't think that argues for not using the macros in the case where you are logging a simple string, but it does argue for keeping the old way available.

Also, some extant log messages don't have file and function because they are making structured readable output and the function noise is just that, and makes the logs harder to read.  It's worse when constructing logs that span functions because you would have to work way too hard to line things up nicely.  If we're going to keep the old log mechanism around, that's okay, you can just continue to use that for these purposes.  Otherwise, you might want have decorated and non-decorated variants.


https://reviews.llvm.org/D27459





More information about the lldb-commits mailing list