Bug 1543501 - Print a 'token' that allows output from MOZ_DBG() to be easily grepped for among other output. r=heycam
authorBotond Ballo <botond@mozilla.com>
Fri, 12 Apr 2019 16:49:56 +0000
changeset 469311 daaf43ea3783878dfb91e545949762be737acf98
parent 469310 2fb7a78d5bb56e910ce04e55c54b9f3a3f1cc949
child 469312 8a857aaa693aa39a762eab3acec6c4aad9506933
push id112780
push userbtara@mozilla.com
push dateFri, 12 Apr 2019 22:09:00 +0000
treeherdermozilla-inbound@bb72c0829808 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1543501
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1543501 - Print a 'token' that allows output from MOZ_DBG() to be easily grepped for among other output. r=heycam Differential Revision: https://phabricator.services.mozilla.com/D26984
mfbt/DbgMacro.h
--- a/mfbt/DbgMacro.h
+++ b/mfbt/DbgMacro.h
@@ -84,17 +84,17 @@ auto DebugValue(std::ostream& aOut, cons
 
 namespace detail {
 
 // Helper function template for MOZ_DBG.
 template <typename T>
 auto&& MozDbg(const char* aFile, int aLine, const char* aExpression,
               T&& aValue) {
   std::ostringstream s;
-  s << '[' << aFile << ':' << aLine << "] " << aExpression << " = ";
+  s << "[MozDbg] [" << aFile << ':' << aLine << "] " << aExpression << " = ";
   mozilla::DebugValue(s, std::forward<T>(aValue));
   s << '\n';
   fputs(s.str().c_str(), stderr);
   return std::forward<T>(aValue);
 }
 
 }  // namespace detail