| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright 2004 The WebRTC Project Authors. All rights reserved. |    2  *  Copyright 2004 The WebRTC Project Authors. All rights reserved. | 
|    3  * |    3  * | 
|    4  *  Use of this source code is governed by a BSD-style license |    4  *  Use of this source code is governed by a BSD-style license | 
|    5  *  that can be found in the LICENSE file in the root of the source |    5  *  that can be found in the LICENSE file in the root of the source | 
|    6  *  tree. An additional intellectual property rights grant can be found |    6  *  tree. An additional intellectual property rights grant can be found | 
|    7  *  in the file PATENTS.  All contributing project authors may |    7  *  in the file PATENTS.  All contributing project authors may | 
|    8  *  be found in the AUTHORS file in the root of the source tree. |    8  *  be found in the AUTHORS file in the root of the source tree. | 
|    9  */ |    9  */ | 
|   10  |   10  | 
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  104  |  104  | 
|  105 namespace { |  105 namespace { | 
|  106 // Global lock for log subsystem, only needed to serialize access to streams_. |  106 // Global lock for log subsystem, only needed to serialize access to streams_. | 
|  107 CriticalSection g_log_crit; |  107 CriticalSection g_log_crit; | 
|  108 }  // namespace |  108 }  // namespace | 
|  109  |  109  | 
|  110 // The list of logging streams currently configured. |  110 // The list of logging streams currently configured. | 
|  111 // Note: we explicitly do not clean this up, because of the uncertain ordering |  111 // Note: we explicitly do not clean this up, because of the uncertain ordering | 
|  112 // of destructors at program exit.  Let the person who sets the stream trigger |  112 // of destructors at program exit.  Let the person who sets the stream trigger | 
|  113 // cleanup by setting to null, or let it leak (safe at program exit). |  113 // cleanup by setting to null, or let it leak (safe at program exit). | 
|  114 LogMessage::StreamList LogMessage::streams_ GUARDED_BY(g_log_crit); |  114 LogMessage::StreamList LogMessage::streams_ RTC_GUARDED_BY(g_log_crit); | 
|  115  |  115  | 
|  116 // Boolean options default to false (0) |  116 // Boolean options default to false (0) | 
|  117 bool LogMessage::thread_, LogMessage::timestamp_; |  117 bool LogMessage::thread_, LogMessage::timestamp_; | 
|  118  |  118  | 
|  119 LogMessage::LogMessage(const char* file, |  119 LogMessage::LogMessage(const char* file, | 
|  120                        int line, |  120                        int line, | 
|  121                        LoggingSeverity sev, |  121                        LoggingSeverity sev, | 
|  122                        LogErrorContext err_ctx, |  122                        LogErrorContext err_ctx, | 
|  123                        int err, |  123                        int err, | 
|  124                        const char* module) |  124                        const char* module) | 
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  326     } |  326     } | 
|  327     if (!success) { |  327     if (!success) { | 
|  328       ::AllocConsole(); |  328       ::AllocConsole(); | 
|  329     } |  329     } | 
|  330   } |  330   } | 
|  331 #endif  // WEBRTC_WIN |  331 #endif  // WEBRTC_WIN | 
|  332  |  332  | 
|  333   LogToDebug(debug_level); |  333   LogToDebug(debug_level); | 
|  334 } |  334 } | 
|  335  |  335  | 
|  336 void LogMessage::UpdateMinLogSeverity() EXCLUSIVE_LOCKS_REQUIRED(g_log_crit) { |  336 void LogMessage::UpdateMinLogSeverity() | 
 |  337     RTC_EXCLUSIVE_LOCKS_REQUIRED(g_log_crit) { | 
|  337   LoggingSeverity min_sev = dbg_sev_; |  338   LoggingSeverity min_sev = dbg_sev_; | 
|  338   for (auto& kv : streams_) { |  339   for (auto& kv : streams_) { | 
|  339     min_sev = std::min(dbg_sev_, kv.second); |  340     min_sev = std::min(dbg_sev_, kv.second); | 
|  340   } |  341   } | 
|  341   min_sev_ = min_sev; |  342   min_sev_ = min_sev; | 
|  342 } |  343 } | 
|  343  |  344  | 
|  344 void LogMessage::OutputToDebug(const std::string& str, |  345 void LogMessage::OutputToDebug(const std::string& str, | 
|  345                                LoggingSeverity severity, |  346                                LoggingSeverity severity, | 
|  346                                const std::string& tag) { |  347                                const std::string& tag) { | 
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  552   } |  553   } | 
|  553  |  554  | 
|  554   if (state) { |  555   if (state) { | 
|  555     state->unprintable_count_[input] = consecutive_unprintable; |  556     state->unprintable_count_[input] = consecutive_unprintable; | 
|  556   } |  557   } | 
|  557 } |  558 } | 
|  558  |  559  | 
|  559 ////////////////////////////////////////////////////////////////////// |  560 ////////////////////////////////////////////////////////////////////// | 
|  560  |  561  | 
|  561 }  // namespace rtc |  562 }  // namespace rtc | 
| OLD | NEW |