Add the ability to disable individual log categories, rather
than just the entire log channel.

Add checks, where appropriate, to make sure a log channel/category has 
not been disabled before attempting to write to it.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117715 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBThread.cpp b/source/API/SBThread.cpp
index 810b114..b28a379 100644
--- a/source/API/SBThread.cpp
+++ b/source/API/SBThread.cpp
@@ -469,7 +469,6 @@
 SBProcess
 SBThread::GetProcess ()
 {
-    Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     SBProcess process;
     if (m_opaque_sp)
@@ -478,6 +477,7 @@
         process.SetProcess(m_opaque_sp->GetProcess().GetTarget().GetProcessSP());
     }
 
+    Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
     if (log)
     {
         SBStream sstr;