diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-10 15:21:50 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-10 15:21:50 +0000 |
commit | 9ade35028d2b2d7b15c24520a8280af39ed120e1 (patch) | |
tree | bfaf8fd1e0c7d7fa40091e62bb8f2397b3aa8534 /ace/Log_Msg.cpp | |
parent | 2a30ba0b4d8e0dcf29b6fc8f602d86de72f7b770 (diff) | |
download | ATCD-9ade35028d2b2d7b15c24520a8280af39ed120e1.tar.gz |
(log): only re-enable tracing if it had not been explicitly disabled.
Diffstat (limited to 'ace/Log_Msg.cpp')
-rw-r--r-- | ace/Log_Msg.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index 87424d7fc15..51ee8a42906 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -804,7 +804,7 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str, case 'I': // Indent with nesting_depth*width spaces type = SKIP_SPRINTF; - if (!wpc) + if (!wpc) w[wpc++] = 1; w[wpc-1] *= this->trace_depth_; ACE_OS::memset (bp, ' ', w[wpc-1]); @@ -1032,6 +1032,7 @@ ACE_Log_Msg::log (ACE_Log_Record &log_record, if (ACE_BIT_DISABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::SILENT)) { + int tracing = this->tracing_enabled (); this->stop_tracing (); #if !defined (ACE_WIN32) @@ -1088,7 +1089,9 @@ ACE_Log_Msg::log (ACE_Log_Record &log_record, #else this->msg_ostream ()); #endif /* !ACE_HAS_WINCE */ - this->start_tracing (); + + if (tracing) + this->start_tracing (); } return result; |