diff options
author | Pavel Labath <labath@google.com> | 2017-02-05 00:44:54 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-02-05 00:44:54 +0000 |
commit | 3b7e1981b2f66e0677f964a3e9cf30ce2d7d3f84 (patch) | |
tree | 235951d23167dfb1ee2385c906175011780ba1e7 /lldb/source/API/SBBroadcaster.cpp | |
parent | 978fdb75a4a21d8209b51c08d4bcd16a43e0779d (diff) | |
download | bcm5719-llvm-3b7e1981b2f66e0677f964a3e9cf30ce2d7d3f84.tar.gz bcm5719-llvm-3b7e1981b2f66e0677f964a3e9cf30ce2d7d3f84.zip |
Remove LIBLLDB_LOG_VERBOSE category
Summary:
Per discussion in D28616, having two ways two request logging (log
enable lldb XXX verbose && log enable -v lldb XXX) is confusing. This
removes the first option and standardizes all code to use the second
one.
I've added a LLDB_LOGV macro as a shorthand for if(log &&
log->GetVerbose()) and switched most of the affected log statements to
use that (I've only left a couple of cases that were doing complex
computations in an if(log) block).
Reviewers: jingham, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D29510
llvm-svn: 294113
Diffstat (limited to 'lldb/source/API/SBBroadcaster.cpp')
-rw-r--r-- | lldb/source/API/SBBroadcaster.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/lldb/source/API/SBBroadcaster.cpp b/lldb/source/API/SBBroadcaster.cpp index 5189dd7bb27..68968534745 100644 --- a/lldb/source/API/SBBroadcaster.cpp +++ b/lldb/source/API/SBBroadcaster.cpp @@ -22,25 +22,15 @@ SBBroadcaster::SBBroadcaster() : m_opaque_sp(), m_opaque_ptr(NULL) {} SBBroadcaster::SBBroadcaster(const char *name) : m_opaque_sp(new Broadcaster(NULL, name)), m_opaque_ptr(NULL) { m_opaque_ptr = m_opaque_sp.get(); - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API | - LIBLLDB_LOG_VERBOSE)); - - if (log) - log->Printf( - "SBBroadcaster::SBBroadcaster (name=\"%s\") => SBBroadcaster(%p)", name, - static_cast<void *>(m_opaque_ptr)); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); + LLDB_LOGV(log, "(name=\"{0}\") => SBBroadcaster({1})", name, m_opaque_ptr); } SBBroadcaster::SBBroadcaster(lldb_private::Broadcaster *broadcaster, bool owns) : m_opaque_sp(owns ? broadcaster : NULL), m_opaque_ptr(broadcaster) { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API | - LIBLLDB_LOG_VERBOSE)); - - if (log) - log->Printf("SBBroadcaster::SBBroadcaster (broadcaster=%p, bool owns=%i) " - "=> SBBroadcaster(%p)", - static_cast<void *>(broadcaster), owns, - static_cast<void *>(m_opaque_ptr)); + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); + LLDB_LOGV(log, "(broadcaster={0}, owns={1}) => SBBroadcaster({2})", + broadcaster, owns, m_opaque_ptr); } SBBroadcaster::SBBroadcaster(const SBBroadcaster &rhs) |