Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: webrtc/system_wrappers/source/logging.cc

Issue 1331503002: Disable base/logging.h stderr logs by default for webrtc/ tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/system_wrappers/source/logging.cc
diff --git a/webrtc/system_wrappers/source/logging.cc b/webrtc/system_wrappers/source/logging.cc
index da1c1a57d8a75f39362bdeda88b45d90c6025135..45a0985454486e1da9389084453de4b6619fa15f 100644
--- a/webrtc/system_wrappers/source/logging.cc
+++ b/webrtc/system_wrappers/source/logging.cc
@@ -32,7 +32,8 @@ TraceLevel WebRtcSeverity(LoggingSeverity sev) {
}
}
-const char* DescribeFile(const char* file) {
+// Return the filename portion of the string (that following the last slash).
+const char* FilenameFromPath(const char* file) {
const char* end1 = ::strrchr(file, '/');
const char* end2 = ::strrchr(file, '\\');
if (!end1 && !end2)
@@ -45,7 +46,7 @@ const char* DescribeFile(const char* file) {
LogMessage::LogMessage(const char* file, int line, LoggingSeverity sev)
: severity_(sev) {
- print_stream_ << "(" << DescribeFile(file) << ":" << line << "): ";
+ print_stream_ << "(" << FilenameFromPath(file) << ":" << line << "): ";
}
bool LogMessage::Loggable(LoggingSeverity sev) {
« webrtc/base/logging.cc ('K') | « webrtc/base/logging.cc ('k') | webrtc/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698