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

Unified Diff: gpu/command_buffer/service/logger.cc

Issue 16042005: Prepend the log prefix everywhere (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« no previous file with comments | « gpu/command_buffer/service/error_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/logger.cc
diff --git a/gpu/command_buffer/service/logger.cc b/gpu/command_buffer/service/logger.cc
index 54b0233d8ecd345c0f028b2f000b8f404fe19387..b985e5eb4306199cfe0eb06250d9721b188ec4be 100644
--- a/gpu/command_buffer/service/logger.cc
+++ b/gpu/command_buffer/service/logger.cc
@@ -18,7 +18,8 @@ Logger::Logger(const DebugMarkerManager* debug_marker_manager)
log_message_count_(0),
log_synthesized_gl_errors_(true) {
Logger* this_temp = this;
- this_in_hex_ = base::HexEncode(&this_temp, sizeof(this_temp));
+ this_in_hex_ = std::string("GroupMarkerNotSet(crbug.com/242999)!:") +
+ base::HexEncode(&this_temp, sizeof(this_temp));
}
Logger::~Logger() {}
@@ -28,15 +29,16 @@ void Logger::LogMessage(
if (log_message_count_ < kMaxLogMessages ||
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableGLErrorLimit)) {
+ std::string prefixed_msg(std::string("[") + GetLogPrefix() + "]" + msg);
++log_message_count_;
// LOG this unless logging is turned off as any chromium code that
// generates these errors probably has a bug.
if (log_synthesized_gl_errors_) {
::logging::LogMessage(
- filename, line, ::logging::LOG_ERROR).stream() << msg;
+ filename, line, ::logging::LOG_ERROR).stream() << prefixed_msg;
}
if (!msg_callback_.is_null()) {
- msg_callback_.Run(0, msg);
+ msg_callback_.Run(0, prefixed_msg);
}
} else {
if (log_message_count_ == kMaxLogMessages) {
« no previous file with comments | « gpu/command_buffer/service/error_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698