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

Unified Diff: base/logging_win.cc

Issue 9584017: New test infrastructure for producing verbose logs in failing tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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: base/logging_win.cc
diff --git a/base/logging_win.cc b/base/logging_win.cc
index a71466578847f355bab8ddca045e0dacaef68497..6e58795c7e401417fd984b5c02a082c15e544954 100644
--- a/base/logging_win.cc
+++ b/base/logging_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -57,8 +57,12 @@ bool LogEventProvider::LogMessage(logging::LogSeverity severity,
// And now log the event.
if (provider->enable_flags() & ENABLE_LOG_MESSAGE_ONLY) {
EtwMofEvent<1> event(kLogEventId, LOG_MESSAGE, level);
- event.SetField(0, message.length() + 1 - message_start,
- message.c_str() + message_start);
+ if (provider->enable_flags() & ENABLE_DETAILED_LOG_MESSAGE) {
+ event.SetField(0, message.length() + 1, message.c_str());
+ } else {
+ event.SetField(0, message.length() + 1 - message_start,
+ message.c_str() + message_start);
+ }
provider->Log(event.get());
} else {
@@ -83,8 +87,12 @@ bool LogEventProvider::LogMessage(logging::LogSeverity severity,
// The file.
event.SetField(3, strlen(file) + 1, file);
// And finally the message.
- event.SetField(4, message.length() + 1 - message_start,
- message.c_str() + message_start);
+ if (provider->enable_flags() & ENABLE_DETAILED_LOG_MESSAGE) {
+ event.SetField(4, message.length() + 1, message.c_str());
+ } else {
+ event.SetField(4, message.length() + 1 - message_start,
+ message.c_str() + message_start);
+ }
provider->Log(event.get());
}
« no previous file with comments | « base/logging_win.h ('k') | chrome/chrome_tests.gypi » ('j') | chrome/test/base/file_logger_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698