diff options
Diffstat (limited to 'chromium/third_party/webrtc/base/logging.h')
-rw-r--r-- | chromium/third_party/webrtc/base/logging.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/chromium/third_party/webrtc/base/logging.h b/chromium/third_party/webrtc/base/logging.h index b8f460c1bd8..e40ca4465fd 100644 --- a/chromium/third_party/webrtc/base/logging.h +++ b/chromium/third_party/webrtc/base/logging.h @@ -54,8 +54,9 @@ #include <sstream> #include <string> #include <utility> + #include "webrtc/base/basictypes.h" -#include "webrtc/base/criticalsection.h" +#include "webrtc/base/constructormagic.h" #include "webrtc/base/thread_annotations.h" namespace rtc { @@ -131,8 +132,6 @@ class LogSink { class LogMessage { public: - static const uint32 WARN_SLOW_LOGS_DELAY = 50; // ms - LogMessage(const char* file, int line, LoggingSeverity sev, LogErrorContext err_ctx = ERRCTX_NONE, int err = 0, const char* module = NULL); @@ -152,11 +151,11 @@ class LogMessage { // If this is not called externally, the LogMessage ctor also calls it, in // which case the logging start time will be the time of the first LogMessage // instance is created. - static uint32 LogStartTime(); + static uint32_t LogStartTime(); // Returns the wall clock equivalent of |LogStartTime|, in seconds from the // epoch. - static uint32 WallClockStartTime(); + static uint32_t WallClockStartTime(); // LogThreads: Display the thread identifier of the current thread static void LogThreads(bool on = true); @@ -196,7 +195,7 @@ class LogMessage { typedef std::list<StreamAndSeverity> StreamList; // Updates min_sev_ appropriately when debug sinks change. - static void UpdateMinLogSeverity() EXCLUSIVE_LOCKS_REQUIRED(crit_); + static void UpdateMinLogSeverity(); // These write out the actual log messages. static void OutputToDebug(const std::string& msg, @@ -216,13 +215,6 @@ class LogMessage { // the message before output. std::string extra_; - // If time it takes to write to stream is more than this, log one - // additional warning about it. - uint32 warn_slow_logs_delay_; - - // Global lock for the logging subsystem - static CriticalSection crit_; - // dbg_sev_ is the thresholds for those output targets // min_sev_ is the minimum (most verbose) of those levels, and is used // as a short-circuit in the logging macros to identify messages that won't @@ -293,7 +285,7 @@ class LogMessageVoidify { rtc::LogMessage(__FILE__, __LINE__, sev).stream() // The _F version prefixes the message with the current function name. -#if (defined(__GNUC__) && defined(_DEBUG)) || defined(WANT_PRETTY_LOG_F) +#if (defined(__GNUC__) && !defined(NDEBUG)) || defined(WANT_PRETTY_LOG_F) #define LOG_F(sev) LOG(sev) << __PRETTY_FUNCTION__ << ": " #define LOG_T_F(sev) LOG(sev) << this << ": " << __PRETTY_FUNCTION__ << ": " #else |