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/Expression/ClangFunction.cpp b/source/Expression/ClangFunction.cpp
index b7f3d0d..bfde5fd 100644
--- a/source/Expression/ClangFunction.cpp
+++ b/source/Expression/ClangFunction.cpp
@@ -543,6 +543,7 @@
             // Right now this is the only way to tell we've timed out...
             // We should interrupt the process here...
             // Not really sure what to do if Halt fails here...
+            log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP);
             if (log)
                 if (try_all_threads)
                     log->Printf ("Running function with timeout: %d timed out, trying with all threads enabled.",
@@ -609,6 +610,7 @@
         }
         else
         {
+            log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP);
             if (log)
             {
                 StreamString s;
@@ -675,7 +677,9 @@
                     event_explanation = ts.GetData();
                 } while (0);
                 
-                log->Printf("Execution interrupted: %s %s", s.GetData(), event_explanation);
+                log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP);
+                if (log)
+                    log->Printf("Execution interrupted: %s %s", s.GetData(), event_explanation);
             }
             
             return_value = eExecutionInterrupted;