Index: third_party/libjingle/overrides/talk/base/logging.cc |
diff --git a/third_party/libjingle/overrides/talk/base/logging.cc b/third_party/libjingle/overrides/talk/base/logging.cc |
index e3acfc39e74c7c02e8f9669956060c8802ecc0bd..3e471817d737af6b8be9c392ae7fc4aad88f7db9 100644 |
--- a/third_party/libjingle/overrides/talk/base/logging.cc |
+++ b/third_party/libjingle/overrides/talk/base/logging.cc |
@@ -31,6 +31,8 @@ |
namespace talk_base { |
void (*g_logging_delegate_function)(const std::string&) = NULL; |
+void (*g_extra_logging_init_function)( |
+ void (*logging_delegate_function)(const std::string&)) = NULL; |
#ifndef NDEBUG |
COMPILE_ASSERT(sizeof(base::subtle::Atomic32) == sizeof(base::PlatformThreadId), |
atomic32_not_same_size_as_platformthreadid); |
@@ -308,6 +310,16 @@ void InitDiagnosticLoggingDelegateFunction( |
IPAddress::set_strip_sensitive(true); |
#endif |
g_logging_delegate_function = delegate; |
+ |
+ if (g_extra_logging_init_function) |
+ g_extra_logging_init_function(delegate); |
+} |
+ |
+void SetExtraLoggingInit( |
+ void (*function)(void (*delegate)(const std::string&))) { |
tommi (sloooow) - chröme
2013/11/14 08:12:18
nit: it would be more readable to have a typedef f
Henrik Grunell
2013/11/14 09:04:08
Agree, added todo in the header.
|
+ CHECK(function); |
+ CHECK(!g_extra_logging_init_function); |
+ g_extra_logging_init_function = function; |
} |
} // namespace talk_base |