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.

llvm-svn: 117715
This commit is contained in:
Caroline Tice
2010-10-29 21:48:37 +00:00
parent 4a0c2d73c3
commit 20ad3c40f4
30 changed files with 264 additions and 48 deletions

View File

@@ -385,7 +385,6 @@ SBProcess::WaitUntilProcessHasStopped (SBCommandReturnObject &result)
SBError
SBProcess::Continue ()
{
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
SBError sb_error;
if (IsValid())
@@ -401,6 +400,7 @@ SBProcess::Continue ()
else
sb_error.SetErrorString ("SBProcess is invalid");
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
if (log)
{
SBStream sstr;
@@ -428,7 +428,6 @@ SBProcess::Destroy ()
SBError
SBProcess::Stop ()
{
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
SBError sb_error;
if (IsValid())
@@ -436,6 +435,7 @@ SBProcess::Stop ()
else
sb_error.SetErrorString ("SBProcess is invalid");
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
if (log)
{
SBStream sstr;
@@ -452,7 +452,6 @@ SBProcess::Stop ()
SBError
SBProcess::Kill ()
{
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
SBError sb_error;
if (m_opaque_sp)
@@ -460,6 +459,7 @@ SBProcess::Kill ()
else
sb_error.SetErrorString ("SBProcess is invalid");
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
if (log)
{
SBStream sstr;